问题
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_Twitter", referenced from:
objc-class-ref in FirebaseTwitterAuthUI(FUITwitterAuth.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am having that error when I want to build the project.
Any idea how to fix this?
回答1:
Error Explanation : The error suggests that the compiler could not able to find the Twitter class while building the FirebaseTwitterAuthUI for arm64 architecture. It is because of Architecture settings.
Check the Build Active Architectures Only setting from the Build Settings. Make sure that this should be same for your application target and for the cocoapods target.
If you still face the issue, post the screenshot of your Xcode with build setting.
Target -> Build Settngs -> Build Active Architecture Only.
Build Active Architecture flag => Yes indicates that build the current app only for the selected simulator architecture. It will make build faster.
Build Active Architecture flag => No indicates that build the current app for all the architectures.
So if you have multiple targets with different options, you will be able to get this kind of error.
Build Active Architecture flag => Yes for Debug and => No for Release mode.
check this :_OBJC_CLASS_$_FIRPhoneAuthProvider", referenced from: objc-class-ref in LoginVC.o Getting this error
回答2:
Check that the framework you are importing has that architecture defined:
In terminal run:
lipo -info
The output should be something like:arm64 armv7 armv7s
If not, 1. your library is wrong and is missing that architecture 2. Your build settings doesn’t include that architecture 3. You are not linking the library correctly
来源:https://stackoverflow.com/questions/47891146/undefined-symbols-for-architecture-arm64-objc-class-twitter