Undefined characters with debug lines in Firebase / CrashReporting

Since upgrading to Firebase Crash Reporting 3.8.0 via Cocoapods, I see the following error during build for Debug mode. I can build in Release mode without errors.

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)
+4
source share
1 answer

This occurs when the Xcode Build Active Architecture Only parameter is set to NO in debug mode.

Some of the Firebase SDKs rely on containers created from the source. By default, CocoaPods sets the Build Build Architecture to only YES for all Pods built from the source when working in Debug. This mismatch causes the missing characters you mentioned.

:

  • Switch Build Active Architecture YES .
  • "Build Active Architecture" "" ( 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
    
+5

Source: https://habr.com/ru/post/1659237/


All Articles