Search code examples
iphoneiosipadbuildxcode4.5

Deploy with iPhone Target only when Archiving


I'm developing an app made for an iPhone, but would like to gradually support the iPad's screen. However, it would be great if I could release the app via ad-hoc with the iPhone as a target, but develop it with universal support.

To be brief, I want to press Product --> Archive and get this:
http://modmyi.com/images/anthony/dashboardmapipad1.png

And get this when I press Product --> Run: https://i.sstatic.net/3r9RP.png

I tried editing the scheme, but there are no options available it seems.


Solution

  • This isn't exactly what you are asking for but it should work:

    • Copy your target
    • Set one target to be iPhone and the other to Universal
    • Have two schemes, one that uses the iPhone-only target, one that uses the Universal target
    • Use the iPhone-only scheme for archiving, use the Universal scheme for development and debugging.