One XCode project, two target, two apps (iPhone/iPad) not universal app

12.7k views Asked by At

We have an XCode project that was first build as an universal app, and then on the road we changed our mind on having the two app in the same binary, so we created two targets.

  1. The first one is called: AppName and is for iPhone: the base SDK is 4.2 and deployment target is 3.1.3. Targeted Device is iPhone.
  2. The second is called: AppNameHD and is for iPad: the base SDK is 3.2 and targeted device is iPad.

It's been a few weeks now we are easily building for each of those platform and able to deploy on the both iPad and iPhone.

Now we are ready to submit to the app store and i'm worried about potential rejection of the code. We want to submit the iPad only app for now, but i've looked around there is nowhere in the itunesconnect site i can specify the targeted device, and as the project was structured first to be an universal app. I'm wondering how they determine on which device to test the binary.

More informations about the architecture: We are using the default generated info.plist file for both targets. Should we have a separate info.plist for each of the target? what differences should be present between the two .plist files.

Here is attached the actual info.plist file we are using.

Thanks for your help in advance.enter image description here

4

There are 4 answers

1
Bogatyr On BEST ANSWER

First of all, there's no reason why your base SDK for the ipad only target should be 3.2. In fact, since iOS 4.2 runs on ipad, you're going to limit your customer base by not changing the base SDK to 4.2. You can set your target OS to iOS 3.2 to make sure the app will run on iOS 3.2.

In your target configuration build settings, look for "targeted device family", that will say whether or not the target is "ipad", "iphone" or (for universal apps) "iphone/ipad".

I also migrated a universal app to two separate targets -- it was not fun. You have to very carefully check your build settings and your .plist files to make sure they're sane for their intended target device, especially check:Base SDK, iOS deployment target, targeted device family, and Info.plist file

0
loafoe On

Apple uses your Info.plist to determine the target(s) in itunesconnect.

Looking at your screenshot I think you just need to make sure you do not specify the NSMainNibFile~ipad an UISupportedInterfaceOrientations~ipad in the iPhone target and visa versa for the iPad target (i.e. do not include iPhone specific entries). BTW, opening the Info.plist in Xcode provides much more descriptive names for the keys and also provides a dropdown for the allowed values.

Also be careful with UIRequiredDeviceCapabilities i.e. as a general rule only include a key in your plist if it's absolutely needed.

0
ohho On

Should we have a separate info.plist for each of the target?

  • Yes.

What differences should be present between the two .plist files?

  • Bundle identifier (e.g., com.example.app for iPhone/iPod and com.example.app-hd for iPad)
  • (optional) icon (different for iPhone, iPhone @2x and iPad)
  • (optional) Launch image (different for iPhone, iPhone @2x and iPad)
  • (optional) Supported interface orientations (in my experience, at least 2 orientations for iPad)
0
kiran On

To use an IPhone app in iPad, launch image is not getting, solution:

Select "Don't Use Assets Catalog" for launch images in General settings. Add,