Undefined symbols for architecture arm64: “_OBJC_CLASS_$_Twitter”,

风流意气都作罢 提交于 2019-12-13 16:28:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!