【问题标题】:"Use of undeclared identifier 'Braintree'" error after manual Braintree integration without using CocoaPods在不使用 CocoaPods 的情况下手动集成 Braintree 后出现“使用未声明的标识符 'Braintree'”错误
【发布时间】:2015-05-31 07:25:52
【问题描述】:

调用[Braintree braintreeWithClientToken时出现以下错误。

ViewController.m:21:27:使用未声明的标识符“Braintree”

我按照Manual Integration Without CocoaPods 指南将 Braintree 添加到新的 Objective-C 项目中。

解决方案 - 构建Braintree.framework

我已经成功构建了一个 Braintree.framework,可以轻松地在 iOS 应用、Objective-C 或 Swift 中使用。

有说明:

https://github.com/exchangegroup/braintree-framework-builder

【问题讨论】:

  • 我面临同样的错误。你找到解决办法了吗?
  • 看起来像我们resolved this on GitHub。随时在此处发布您的解决方案作为后代的答案。

标签: ios xcode braintree


【解决方案1】:

这里有一个 PR 可以修复你的 Demo 中的这个错误:https://github.com/exchangegroup/brain-tree-manual-setup-error-four/pull/1

这里有一个 PR 可以在你的新 Demo 中修复这个错误:https://github.com/exchangegroup/braintree-manul-setup-ten/pull/1

不幸的是,使用 <angled> 包含的 #import 语句必须替换为 "quotes"。虽然不理想,但这是一个使用查找和替换正则表达式的简单操作:<Braintree/(.*)> -> "$1"

如果您要进行新的集成,Braintree 建议您使用 using CocoaPods instead。如果 CocoaPods 不适用于您的用例,请告诉我们。

希望这会有所帮助:)

【讨论】:

    猜你喜欢
    • 2017-01-27
    • 2021-10-19
    • 1970-01-01
    • 1970-01-01
    • 2015-05-31
    • 1970-01-01
    • 2014-08-04
    • 2020-05-05
    相关资源
    最近更新 更多