Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore some static library for iOS simulator

I am trying to build my project for sdk iphoneos and iphonesimulator. There are few .a static libraries that can only be utilized for iphoneos. Where can I go an ignore these files if its being build for iphonesimulator within XCode?

Thanks.

like image 795
topgun Avatar asked Sep 12 '25 14:09

topgun


1 Answers

Instead of hard linking the libraries, use the "Other Linker Flags" setting in the project configuration settings. You'll be able to link different versions of libraries based on the current build configuration.

By default you already have Debug and Release build configuration, press the "plus" button on the Debug will add a configuration for a specific architecture. Choose "Any iOS Simulator" and link the libraries you would like to use to run the app on simulator. Then press the "plus" button on the Debug again, this time choose "Any iOS" and link the libraries you would like to use to run the app on the device.

Lastly, do the same thing for the Release configuration.

like image 95
Khanh Avatar answered Sep 14 '25 03:09

Khanh