Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPod Touch 4G thinks it's an iPad

I have a universal app built that runs and works perfectly on an iPad, iPhone 4G, 3GS & 3G, but when run on an iPod Touch 4G it won't run properly.

I don't have a iPod Touch to test, but I have been told by a beta tester that it installs on the device fine, but when run it shows the Default.png from the iPad version of the app squashed into the screen when launched, then just goes black from there. When the app is force quit (using the app switcher) and re-launched it does the same thing again.

I have double checked that the Targeted Device Family is iPhone/iPad and done a clean build etc. but still no dice.

like image 811
Domestic Cat Avatar asked Feb 26 '23 13:02

Domestic Cat


1 Answers

So after some trial and error I worked out what the problem was (actually two separate but related problems):

In my info.plist I was using two keys to assign the different MainWindow files:

Main nib file base name (iPad)

and

Main nib file base name (iPhone)

I mistakenly thought the second key would apply to the iPod Touch also as there is no Main nib file base name (iPodTouch) key. Turns out this is wrong and the iPod Touch actually looks for the Main nib file base name key. So now I have it setup like this:

alt text

..and it's working fine in 3.1.3 & 4.2. (Note that application:didFinishLaunchingWithOptions is not called if the device can't find a MainWindow to use, that's how I worked out the problem).

I suspect the same will apply to the Launch image (iPad), Launch image (iPhone) and Launch image keys, which would explain why the iPod Touch is using the iPad launch image but haven't been able to try it yet.

like image 144
Domestic Cat Avatar answered Mar 06 '23 15:03

Domestic Cat