I have an iPhone SDK project that is supposed to build a static library for both the simulator and the ARM processor and then combine the two into a universal library.
Heretofore, I was using iPhone SDK 3+ and accomplished this by creating a separate target for each, one simulator and one ARM, and then making a third target that combines them using a shell script. The deployment targets/build settings for each of the constituent targets are set to their respective architectures, etc. Also, iPhone SDK 3+ allowed me to select "Base SDK" from the drop down menu in the upper-left corner of the main XCode window.
Everything worked famously--then I upgraded to SDK 4.
Now, there is no "Base SDK" listing in the drop down menu in the upper-left. Also, the compiler seems to ignore the target deployment settings entirely. Even though one of the targets is set to "iPhone Device" and the other is set to "iPhone Simulator", they still build as whatever is set in the drop down menu.
In case I've not been clear enough, here is the offensive offending aforementioned menu we all know and love:
Once again, in SDK 3 everything worked perfectly. Now in SDK 4, if it's set to "Device" I get two libraries built for ARM. If it's set to simulator, I get two libraries built for the simulator.
Anybody know of a workaround for this bullhonkey?
Thanks much.
UPDATE: the "xcodebuild" command line tool still works, that is to say it will build the correct architecture according to each target's deployment parameters.
Thus, rather than using XCode's GUI to build, I can use a shell script that calls xcodebuild like so:
xcodebuild -target device-target -configuration Debug xcodebuild -target sim-target -configuration Debug
It'd still be nice to find a real solution, but this will get the job done for now.