Overview & Motivation
I would like to set up some Schemes that build for iOS Device only.
For example, I never want to build an Ad Hoc build with a Simulator destination. The ability to choose Simulator destinations for an Ad Hoc build is just noise.
Desired Behavior
Actual Behavior
What I tried
iphoneos
only.Results so far
I can still select Simulator as a destination in the scheme dropdown:
However, if I run the scheme with a Simulator destination, I get an expected, appropriate error:
It would be much nicer for myself and my team is would could just hide these invalid destinations.
Is there a better way to manage what destinations are available for a given scheme?
Updated Answer
Hmmm. This works for me with ONE target. I removed the platforms from the Supported Platforms in the configuration and they disappeared from the Scheme.
I then tried adding another configuration that allows the simulator and it's still just the device destination visible. Then I duplicated the target and added in iphonesimulator ... and the simulator shows up in the scheme for both targets.
Unfortunately, I think the available destinations are an aggregated list of those available to all targets. File a bug report: http://bugreporter.apple.com
Another Update
AH! It looks like an Xcode bug with updating the Scheme selector! I configured each target's settings - one to omit the simulator and the other to keep it - then closed and re-opened the project. Magically, the first target had only the iOS Device destination while the other target had the device + simulator destinations.
So, the answer may well be to duplicate your desired targets and set them to allow only the device, then make sure your scheme is properly named so you know which target is being built. Close and re-open the project and the list should show up just as you'd expect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With