【发布时间】:2016-03-30 19:15:50
【问题描述】:
虽然 Stripe 集成非常简单,但 Braintree 集成对我不起作用:
我正在使用 Braintree 指南 (https://developers.braintreepayments.com/start/hello-client/ios/v4) 并在一个为 iOS 9.2 设计的应用程序中使用 Xcode 7.3 和 Swift 2.2 实现 SDK。
- 我成功安装了 Braintree pod
- 我在我的 pod 文件中添加了 use_frameworks! 语句
- 我已将 import 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'*
编辑:我通过添加一个桥头来修复 (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 install”,但它不起作用)
有什么帮助吗?
最好的,
罗伯
【问题讨论】:
标签: ios iphone xcode swift braintree