Undefined symbols for architecture arm64

前端 未结 30 1792
南旧
南旧 2020-11-22 08:17

I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods.

Undefined symbols for architecture arm64:
  \"_OBJC_CLASS_$_FBSession\", r         


        
30条回答
  •  清酒与你
    2020-11-22 09:03

    I ran into the same/similar issue implementing AVPictureInPictureController and the issue was that I wasn't linking the AVKit framework in my project.

    The error message was:

    Undefined symbols for architecture armv7:
       "_OBJC_CLASS_$_AVPictureInPictureController", referenced from:
           objc-class-ref in yourTarget.a(yourObject.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    The Solution:

    1. Go to your Project
    2. Select your Target
    3. Then, go to Build Phases
    4. Open Link Binary With Libraries
    5. Finally, just add + the AVKit framework / any other framework.

    Hopefully this helps someone else running into a similar issue I had.

提交回复
热议问题