Search code examples
iosiphonexcode7xcode8

Library not working on simulator


Hello I'm using a library in my project, and basically it's working on real devices, but not on simulator. I would like to know how to add compatibility with simulator also.

I've search around, and I found some answers that should have solved my problem, but they're not doing it. (Maybe I'm doing things wrong, but still not working).

I'm getting this error:

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

I tried it on xcode7 and xcode8.

Thanks.


Solution

  • Maybe you're using a framework or library which was only built for ARM architecture. In that case you'll have to create fat binary which will include code for all platforms (x86 for simulator, ARM and ARM64 for iOS devices).