After updating to Xcode 8, the app won't run on devices, only on the simulator. The errors are thrown for all pods added to the project:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
objc-class-ref in FeedViewController.o
"_OBJC_CLASS_$_TSMessage", referenced from:
l_OBJC_$_CATEGORY_TSMessage_$_Override in NotificationMessenger.o
objc-class-ref in NotificationMessenger.o
"_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_METACLASS_$_SWTableViewCell", referenced from:
_OBJC_METACLASS_$_MessagesCell in MessagesCell.o
_OBJC_METACLASS_$_PaymentMethodCell in PaymentMethodCell.o
_OBJC_METACLASS_$_SwipeTitleCell in SwipeTitleCell.o
"_OBJC_CLASS_$_FBRequestConnection", referenced from:
objc-class-ref in FacebookManager.o
"_OBJC_CLASS_$_SWTableViewCell", referenced from:
_OBJC_CLASS_$_MessagesCell in MessagesCell.o
_OBJC_CLASS_$_PaymentMethodCell in PaymentMethodCell.o
_OBJC_CLASS_$_SwipeTitleCell in SwipeTitleCell.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in FacebookManager.o
"_OBJC_CLASS_$_AFURLSessionManager", referenced from:
objc-class-ref in HTTPSessionTask.o
"_OBJC_CLASS_$_Branch", referenced from:
objc-class-ref in MyImpactViewController.o
objc-class-ref in UINavigationController+Activity.o
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in FacebookManager.o
objc-class-ref in ExternalFacebookCommand.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
For each of the files, this warning is also thrown:
file was built for archive which is not the architecture being linked (arm64)
Active architectures are OK, I've tried deleting derived data folder, reinstalling the pods, setting Build Active Architectures Only to YES and NO, but nothing works.
My Podfile looks like this:
platform :ios, '8.0'
workspace 'Purple'
target 'Purple' do
pod 'AFNetworking', '2.6.3'
pod 'SAMKeychain', '~> 1.3'
pod 'TSMessages'
pod 'Facebook-iOS-SDK', '~> 3.23.2'
pod 'SWTableViewCell'
pod 'CardIO'
pod 'Parse'
pod 'PureLayout'
pod 'Branch'
pod 'DZNEmptyDataSet'
end
You can fix the linker error by going to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s. Note though, this means you won't get the full power of the 64 bit processor.
It means that framework is not included.
Why Is the Undefined Symbols for Architecture x86_64: Error Happening? This error is happening due to the lack of included values inside the declared statements in your code. The browser is going to render the information incorrectly and show this error, especially if you are working with Main and Similarity tools.
Try clear the XCode caches:
rm -rf ~/Library/Developer/Xcode/DerivedData/
Clear the CocoaPods caches and reinstall the dependencies:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
Finally go to the "Pods" project and set the Build Active Architectures Only to No also for the "Debug" configuration.
Reference https://stackoverflow.com/a/37930840/1773009
"The OPN [Debug] target overrides the OTHER_LDFLAGS build setting". This was the main issue. After adding $(inherited) in new line in other linker flags solved my issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With