Reputation: 3989
I'm attempting to use the Branch.io iOS SDK in my iOS app, and I'm getting the following error when I try to compile:
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)
As the tutorial described, I have the Branch-SDK folder correctly added to the project, I configured the PLST, and added all the code in the AppDelegate.m. I skipped step 3 for enabling universal links, because I won't need that yet.
What am I missing that could be causing this? For this sort of error with other frameworks, it tends to be caused by incorrect declaration of the class, but I don't see where I'm doing that incorrectly.
Upvotes: 4
Views: 8392
Reputation: 8134
For me within the Podfile uncommenting the following line and rerunning the installation resolved this kind of issues in XCode:
use_frameworks!
And do a
pod install
And try cleaning and running the app in XCode once again and it should work. It worked for me.
Upvotes: 1