加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – “架构x86_64的未定义符号:”Branch.io出错

发布时间:2020-12-14 17:24:53 所属栏目:百科 来源:网络整理
导读:我试图在我的iOS应用程序中使用Branch.io iOS SDK,当我尝试编译时遇到以下错误: Undefined symbols for architecture x86_64: “_OBJC_CLASS_$_CSSearchableIndex”,referenced from: objc-class-ref in BranchCSSearchableItemAttributeSet.o “_OBJC_CLAS
我试图在我的iOS应用程序中使用Branch.io iOS SDK,当我尝试编译时遇到以下错误:

Undefined symbols for architecture x86_64:
“_OBJC_CLASS_$_CSSearchableIndex”,referenced from:
objc-class-ref in BranchCSSearchableItemAttributeSet.o “_OBJC_CLASS_$_CSSearchableItem”,referenced from:
objc-class-ref in BranchCSSearchableItemAttributeSet.o “_OBJC_CLASS_$_CSSearchableItemAttributeSet”,referenced from:
_OBJC_CLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o
“_OBJC_METACLASS_$_CSSearchableItemAttributeSet”,referenced from:
_OBJC_METACLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o ld: symbol(s) not found for
architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)

正如tutorial所描述的那样,我将Branch-SDK文件夹正确添加到项目中,我配置了PLST,并添加了AppDelegate.m中的所有代码.我跳过第3步启用通用链接,因为我还不需要它.

我错过了什么可能导致这种情况?对于这种与其他框架的错误,它往往是由类的错误声明引起的,但我没有看到我在做错的地方.

解决方法

对于我在Podfile中取消注释以下行并重新运行安装解决了XCode中的这类问题:

use_frameworks!

做一个

pod install

并尝试再次在XCode中清理和运行应用程序,它应该工作.它对我有用.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读