【发布时间】:2016-07-28 00:04:47
【问题描述】:
这真的让我很沮丧。我之前已经将 Braintree 库集成到几个 iOS 项目中,以便在 swift 中使用并且从来没有真正遇到过问题,但目前我无法让它工作。
我一遍又一遍地遵循/重复这里的说明:
https://developers.braintreepayments.com/start/hello-client/ios/v4
具体来说,我将 pod 'Braintree' 放入我的 Podfile 中,运行 pod install 和 pod update,并验证 Braintree 库现在出现在 Pods 目录中。
我现在也重新制作了 3 次桥接头,小心为我的应用设置目标。我还一遍又一遍地验证我已将我的构建设置中的目标 c 桥接头设置为正确的文件,并让它成功地为其他目标 c 文件创建桥接头。遗憾的是,尽管以下几行在桥接头中不起作用:
#import "BraintreeCore.h"
#import "BraintreeUI.h"
它们都给出了相同类型的编译错误,说找不到 BraintreeCore.h 文件。
我能够在没有出现错误的情况下执行以下操作:
#import "Pods/Braintree/BraintreeCore/Public/BraintreeCore.h"
但是当我尝试对 BraintreeUI.h 做同样的事情时:
#import "Pods/Braintree/BraintreeUI/Public/BraintreeUI.h"
它将我链接到 BraintreeUI.h 文件并告诉我在 BraintreeUI.h 文件中找不到关于此行的“BraintreeCore/BraintreeCore.h”文件:
#import <BraintreeCore/BraintreeCore.h>
我做错了什么??这应该很简单,但它已经激怒了我超过 12 个小时。
【问题讨论】:
标签: objective-c swift braintree bridging-header