Reputation: 4274
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 [email protected] 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:
[email protected] works on iphone 5, but not on ipod touch 5g
[email protected] 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 [email protected] to [email protected] 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 [email protected] or [email protected] 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.
Upvotes: 2
Views: 740
Reputation: 69489
The [email protected]
is not correct this should be [email protected]
. Don't use the ~iphone
modifier on the launch images, the ~iphone
or ~ipad
modifier 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:
Upvotes: 3
Reputation: 520
Device modifier must be at the end of file name http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html
So correct name of file is Default-568h@2x~iphone.png
Upvotes: 1