4

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.

Andrew
  • 3,839
  • 10
  • 29
  • 42

1 Answers1

1

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.

Randika Vishman
  • 7,983
  • 3
  • 57
  • 80
  • for my react native project, lf l enable ```use_framework``` then Flipper will not work. What can l do then? – CanCoder Jul 22 '21 at 13:39
  • @leeCoder I think your question is very specific to your React Native project, its CocoaPods version, and also the Flipper library you are referring to. So better raise an issue in that GitHub repo page. Good luck – Randika Vishman Jul 22 '21 at 17:45