简体   繁体   中英

Apple Mach-O linker error _OBJC_CLASS_$_FIRInstanceID

I've been trying to implement Firebase Notifications to a project that has alot of targets (like 13). I've been struggling but finally made it work on my test device, being able to show notifications when sent by an app called Postman.

The thing is I installed the frameworks by not using cocoapods because whenever I tried to do Pod install, my project couldn't build forcing me to rollback and try it again. So I opted to use this tutorial: https://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/

The app was working fine so I tried to archive it, to publish to testflight, and people told me to always use the Generic iOS Device when publishing to Testflight, so the application works on every device and not only on the one I'm testing.

But when I tried to build the project but on a Generic iOS Device I get the error:

Undefined symbols for architecture armv7s:

  "_OBJC_CLASS_$_FIRInstanceID", referenced from: objc-class-ref in MyINFOAppDelegate.o "_OBJC_CLASS_$_FIRApp", referenced from: objc-class-ref in MyINFOAppDelegate.o 

ld: symbol(s) not found for architecture armv7s

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Not being able to archive and send it to testflight.

What should I do? Already saw a ton of posts of things I did but not able to solve :(

Make sure that the Architectures Build Setting does not include armv7s. By default, Architectures is defined to $(ARCHS_STANDARD) which maps to "armv7 arm64"

Firebase binary distributions don't include armv7s - only armv7, i386, x86_64 and arm64.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM