在iOS应用程序中实现Braintree SDK时的错误(swift 2.2 / xcode 7.3)

时间:2016-03-30 19:15:51

标签: ios iphone xcode swift braintree

虽然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. 我已将导入Braintree 添加到我的ViewController
  4. ...当我尝试模拟器时,一切都出错了:

    (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标头修复了(3)(虽然我假设你根据指南在使用use_frameworks时不需要一个!)

    我在Build阶段看到了一个额外的错误:

    *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',但它没有工作)

    有任何帮助吗?

    最佳,

    罗布

1 个答案:

答案 0 :(得分:0)

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