Appcelerator Titanium 和 Apple Pay

Appcelerator Titanium and Apple Pay

我正在尝试在 Titanium 应用程序中使用 Apple Pay。到目前为止,在我 运行 应用程序的三分之一时间里,我已经让它正常工作,其余时间应用程序崩溃。我怀疑是没有将 apple pay 权利添加到应用程序导致崩溃(不幸的是,当应用程序崩溃时,控制台中没有错误消息)。

有没有人幸运地让 Apple Pay 在 Titanium 应用程序中工作?

我成功了。这是我的模块中代码的要点:https://gist.github.com/zach-babb-moovel/bd4172454cf54a178855e76ca5dd1f48. The key was wrapping the PKPaymentRequest and subsequent PKPaymentAuthorizationViewController parts in a dispatch_async call. You'll also have to make sure all your profiles are set up correctly and that you use a custom Entitlements.plist file for your Titanium project. Check out the Entitlements.plist here: https://github.com/hansemannn/applepaydemo/blob/master/Entitlements.plist 它应该是什么样子。

好吧,不用为我的 Ti.ApplePay module 做广告,这可能是采用 Apple Pay with Titanium 的最简单方法。它支持所有主要的 Titanium 版本并包括所有可用的原生 API。试一试或使用自定义的 :-)