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

标签 ios iphone xcode swift braintree

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

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

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

相关文章:

javascript - React Native 在另一个文本组件内附加文本组件

objective-c - NSTimer保留计数增加,为什么?

ios - iBeacon 监控具有相同 UUID 和不同主要、次要的多个信标

iphone - iOS : How to avoid overlapping sound/music in PickerViewController

ios - 在没有 MFMessageComposeViewController 的情况下发送 imessages

ios - 为什么我的 TableView 只显示每个单元格中加载的最后一张图像? ( swift )

ios - 检查是否正在运行应用程序或测试 UI

javascript - react native : Can't run app on iOS correctly "Failed to load bundle(http://localhost:8081/index.bundle?"

ios 增加/减少tableview的大小

iphone - 图表中的文字换行