We have an application which uses the full resolution of the iphone 5 and works so far perfectly. Now we got a complaint from a tester that it does not work on the ipod Touch 5g.
Surprisingly the log shows that [UIScreen mainScreen].bounds returns (320.0, 480.0) on
the ipod Touch while on the iphone 5 it shows the correct bounds (320.0, 568.0) ?!
After this I investigated and it seems that the iOS looks up if an image with “-568h” suffix exists and decides to run either in letterbox mode (320,480) or with full resolution
(320,568).
Now I have a nasty suspicion:
The name of our high-res splashscreen image is Default~iphone-568h@2x.png which accordingly to Apple should work (We have an universal app running on both ipad and iphone).
As I have no ipod touch here yet, can someone confirm this suspicion:
-
Default~iphone-568h@2x.png works on iphone 5, but not on ipod touch 5g
-
Default-568h@2x.png works on both devices.
EDIT: 8-0 I do not believe this. I have now an ipod Touch available and an iphone 5.
As indicated, I am using the ~iphone modifier for the other images to differentiate between ipad and iphone.
Renaming the Default~iphone-568h@2x.png to Default-568h@2x.png now works on ipod touch 5, but not on the iphone 5 anymore. It is exactly reversed !!
Replication:
-
Use an universal app for all devices (iphone/ipad retina/non-retina/4″)
-
Name the “~iphone” identifier for iphone/ipod and nothing for ipad
-
Use either Default~iphone-568h@2x.png or Default-568h@2x.png and look if it runs with the correct full resolution on both iphone 5 and iphone touch 5.
Can please someone confirm this ? Xcode 4.5.2 / iOS SDK 6.0
EDIT 2: rckoenes answer did the trick, but still I am disappointed that the purported device identifier for iphones does not work correctly.
The
Default~iphone-568h@2x.pngis not correct this should beDefault-568h@2x.png. Don’t use the~iphonemodifier on the launch images, the~iphoneor~ipadmodifier is only useful if you need a specific image of view load on different devices. Thus it is not needed for the launch image.You can find this in the iOS App Programming Guide section about the App Launch (Default) Images.
My Universal app has the follwoing images: