Undefined symbols for architecture arm64: Xcode 12

bona912 picture bona912 · Oct 6, 2020 · Viewed 7k times · Source

Im trying to build a project after adding 3rd party framework, however I can't compile the project after adding the framework, I get Undefined symbols for architecture arm64: error when I try to compile on a device, but I can compile on a simulator. I have tried all other solutions I found on stackoverflow. any help is appreciated!

Here is what I have tried:

  • Added Any iOS Simulator SDK with value arm64 inside Excluded Architecture.
  • I do have $(inherited) inside Other Linker Flags
  • Set Bitcode Enabled to No

Non of the solutions I tried worked for me.

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

Answer

Cx. picture Cx. · Nov 4, 2020
  1. "Product" -> "Scheme" -> "Edit Scheme"
  2. select "Build"
  3. Uncheck "Parallelize Build"