在 iOS 应用程序 (swift 2.2 / xcode 7.3) 中实施 Braintree SDK 时出错

Errors while implementing Braintree SDK in iOS app (swift 2.2 / xcode 7.3)

虽然 Stripe 集成非常简单,但 Braintree 集成对我不起作用:

我正在使用 Braintree 指南 (https://developers.braintreepayments.com/start/hello-client/ios/v4) 并在为 iOS 9.2 和 Xcode 7.3 和 Swift 2.2 设计的应用程序中实现 SDK。

  1. 我成功安装了 Braintree pod
  2. 我在我的 pod 文件中添加了 use_frameworks! 语句
  3. 我已将 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'*

编辑:我通过添加桥 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 install',但它不起作用)

有什么帮助吗?

最佳,

罗布

我认为这是 CocoaPods 1.0.0 beta 6 的一个问题,基于 this issue。我能够通过恢复到 1.0.0 beta 5 来解决这个问题。你能告诉我这是否解决了这个问题吗?