Making Xcode ignore static library when building for iOS Simulator

You can use a conditional build settings to specify the library you want to link only on a given platform, instead of adding the library to your project in the usual ways. Specifically, you will need to specify:

 -lQCAR

in "Other Linker Flags".

Have a look at the attached image that should make things more clear (in the picture I am linking only for the simulator, you will want to select a device, I guess).

Also, do not forget to add the path to the directory containing the library to "Library Search Path" build setting (this does not need to be conditional; it would not do any harm on the simulator).

Other linker flags


This issue seems very similar to: Xcode: Conditional Build Settings based on architecture (Device (ARM) vs Simulator (i386))

I believe sergio's solution is very close, but have you tried specifying the full path to the library under Other Linker Flags (potentially without "-l" - just the path)?