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步启用通用链接,因为我还不需要它.
解决方法
use_frameworks!
做一个
pod install
并尝试再次在XCode中清理和运行应用程序,它应该工作.它对我有用.