【发布时间】:2017-04-20 18:58:42
【问题描述】:
我正在尝试通过 Phonegap 构建使用 Apple Pay cordova 插件。这是我在配置文件中的条目:
<plugin name="cordova-plugin-applepay-stripe" source="npm">
<param name="STRIPE_TEST_PUBLISHABLE_KEY" value="xxxxxxxx" />
<param name="STRIPE_LIVE_PUBLISHABLE_KEY" value="xxxxxxxxx" />
<param name="APPLE_MERCHANT_IDENTIFIER" value="merchant.etc.etc" />
</plugin>
插件安装正确,但无法正常工作,因为我在使用 PC 时没有在 Xcode 中启用 Apply Pay 权利。
我知道您可以像我在这里所做的那样直接从 phonegap build config.xml 文件中编辑 plist 文件:
<gap:config-file platform="ios" parent="NSPhotoLibraryUsageDescription" overwrite="true">
<string>We are using the Photo Library for PayPal</string>...
所以我的问题是我到底该如何编辑 Entitlements.plist 文件以便我可以启用 ApplePay 并添加我的商家 ID?!
我尝试了以下方法:
<config-file platform="ios" target="*-Entitlements.plist" parent="com.apple.developer.in-app-payments">
<array>
<string>merchant.etc.etc/string>
</array>
</config-file>
但这并没有奏效。任何帮助,将不胜感激!
【问题讨论】:
-
您使用的是哪个 CLI 版本?并非所有版本都有 Entitlements.plist 文件。另外,添加
overwrite="true"部分 -
也在尝试解决这个问题——想知道你是否取得了任何进展
标签: cordova plist phonegap-build entitlements phonegap