iosxcodexcode5cocoapods

Undefined symbols for architecture arm64


I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods.

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FBSession", referenced from: someFile
ld: symbol(s) not found for architecture arm64

I get about 12 of these, for the various Pods I use.

I am trying to build for the iPhone 5S using XCode 5.

I've been trying various solutions here on SO, but haven't got any of them to work yet.

How do I fix this Apple Mach-O Linker Error?


Just found another warning that might be interesting, I hope this leads me to the solution:

Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a, 

file was built for archive which is not the architecture being linked (arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug-iphoneos/libPods.a


Solution

  • If your Architectures and Valid Architectures are all right, you may check whether you have added $(inherited) , which will add linker flags generated in pods, to Other Linker Flags as below: enter image description here