Reputation: 19980
Since updating to Firebase Crash Reporting 3.8.0 via Cocoapods, I see the following error during builds for Debug mode. I am able to build in Release mode without error.
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_GTMLogNoFilter", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
"_OBJC_CLASS_$_GTMLogBasicFormatter", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
"_OBJC_CLASS_$_GTMLogger", referenced from:
objc-class-ref in FirebaseCrash(FCRSystemLogger_6532fb37dc095ffa73463b57baf5fca7.o)
objc-class-ref in FirebaseCrash(uploader_089041b840f448492d858d7daf481e47.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Upvotes: 4
Views: 1270
Reputation: 293
This occurs when the XCode setting Build Active Architecture Only is set to NO in debug mode.
Several of the Firebase SDKs rely on pods built from source. By default, CocoaPods sets the Build Active Architecture Only to YES for all Pods built from source when running in Debug. This mismatch causes the missing symbols you mentioned.
There are two options to fix the issue:
Set your pods' Build Active Architecture Only to NO while in debug (taken from this post):
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
Upvotes: 5