IOS static library for device, but not for simulator

Getting this error, although the library is in the "Link to Binary Libraries" area, and the header file is also included.

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

I get this error when I create a simulator, but not for the device. I saw this question in the opposite way, where it is built for the simulator, but not for the device. The string for active architecture is set to NO only. Any ideas?

+5
source share
1 answer

The error means that it was TestLibraryEriccreated only for devices (compiled for ARM architectures), and not for a simulator (i386 architecture).

If you created the library, you need to change the build settings.

In the box Supported Platformsyou must have iphoneos.

iphonesimulator, , .

, , .

+5

All Articles