虽然 Stripe 集成非常简单,但 Braintree 集成对我来说不起作用:
我正在使用 Braintree 指南 ( https://developers.braintreepayments.com/start/hello-client/ios/v4 ) 并在使用 Xcode 7.3 和 Swift 2.2 为 iOS 9.2 设计的应用程序中实现 SDK。
- 我成功安装了 Braintree pod
- 我已在 pod 文件中添加了 use_frameworks! 语句
- 我已将导入 Braintree 添加到我的 ViewController
...然后当我尝试模拟器时一切都出错了:
(1)
*error: /Users/Rob/Library/Developer/Xcode/DerivedData/Test- anaajuuxtxcuorcukyrbchlrbqed/Build/Products/Debug-iphonesimulator/Braintree/Braintree-Drop-In-Localization.bundle: No such file or directory
(2)
error: /Users/Rob/Library/Developer/Xcode/DerivedData/Test-anaajuuxtxcuorcukyrbchlrbqed/Build/Products/Debug-iphonesimulator/Braintree/Braintree-UI-Localization.bundle: No such file or directory
(3)
No such module 'Braintree'*
编辑:我通过添加 Bridge header 修复了 (3)(尽管我根据指南假设如果您使用 use_frameworks,则不需要它!)
我在构建阶段看到一个附加错误:
*diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [[ $? != 0 ]] ; then
cat << EOM
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
EOM
exit 1
fi*
(我更新了 CocoaPods 并进行了“pod 安装”,但它不起作用)
有什么帮助吗?
最好,
抢
最佳答案
我认为这是 CocoaPods 1.0.0 beta 6 的问题,基于 this issue 。我可以通过恢复到 1.0.0 beta 5 来解决这个问题。您能让我知道这是否解决了问题吗?
关于ios - 在 iOS 应用程序中实现 Braintree SDK 时出错(swift 2.2/xcode 7.3),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36317741/