I have an Xcode project that builds multiple Loadable Bundles for MacOS. Under the "Architectures" setting, I have "Debug" and "Release" lines, and compiled output shows up under the build/Debug/ or build/Release/ directories. So far so good.
Now I also want to be able to compile that same code for iOS. I'd expect the output to show up under build/Debug-iphonesimulator/ or somesuch.
How do I accomplish this?
I would like the answer to not be, "copy the entire Xcode project" or "have two targets for each bundle". Since the difference between compiling for "Debug" and for "Release" is the same as the difference between compiling for Mac and iOS -- it's just compiler options -- I should be able to do this with the same target, right?
Maybe when I say "Target" I really mean "Scheme" or "Destination" or "Product", because I have no fucking idea what Xcode actually means by any of those words any more.
Xcode 4.3.2, MacOS 10.7.4.
I think if you set the "Supported Platforms" field of your project or target's Build Settings to include "macosx iphoneos iphonesimulator", it'll build for any of those. (It works for static libraries, anyway. Not sure about loadable bundles.)
I see no "Supported Platforms" field. I see an "Architectures" field with sub-elements "Debug" and "Release" but those want CPU type, not OS type. (And adding armv7 to the list did nothing.)
Oh wait, I found it. It was helpfully hidden...
I think that's working, thanks!
I'm glad that worked! (We only knew about this feature because we sent a guy to the WWDC to ask them how to do it in XCode 4 -- it works more-or-less by accident (as far as I can tell) in XCode 3, and we were relying on it.)
Yeah, XCode has the lovely feature that all the settings you haven't set are hidden by default. XCode in general violates so many of Apple's Human Interface Guidelines about UI design (particularly discoverability) that it's not funny.
Didn't you hear? Spindler drove everyone who knew anything about consistent UI all away but splitting the HIG up in 1994. It's a wonder Mac OS X still does even a marginally good job at this, but it's completely unsurprising that XCode's a pile of shit, since it was written after the HIG was dissolved.
s,but (splitting),by \1,
I'm actually still stymied that I can't install 4.3 on my main box. The App Store tells me it is installed.
I'm sure I can trash my environment and fix it, and that will be normal. Which is fine, I've gotten used to installing most of the unix environment I am used to. Over and over again.
But, fuck you, Apple. Smooches.
last time I checked -- and this may very well have changed since then -- the app store installs the _installer_, then you have to run the installer to install xcode.
It has, indeed, changed. XCode is now a single app, and that's installed direct from the app store.
For all the command line utilities, you download them from within XCode after installing it from the app store.
What does System Information say under "Developer"?
The thing different with 4.3 is that there's no "installer" anymore, to install "Command-line tools" and different iOS simulators you have to go Xcode (that's what App Store downloads) in Preferences - Downloads, there's "Install" buttons there. If App Store doesn't want to download it for you, you can get it at http://developer.apple.com after logging in, in the Downloads, it's there too, just the Xcode app in the dmg, no installer.
As for the different bundles (for JWZ) I don't know about that