iPhone 6 Simulator not showing correct image - ios

iPhone 6 simulator shows "bg#2x.png" image instead of "bg-667h#2x.png"
iPhone 6+ simulator is showing "bg#3x.png" image which is correct. Don't know whats the issue with iPhone6.
I have also added splash image for iPhone 6 "Default-667h#2x.png".

You need to have same prefix before # in the filenames for displaying them on iPhone 6 and iPhone 6+. E.g. if bg2014#3x.png was used for iPhone 6+, use bg2014#2x.png for iPhone 6, with respective resolution of course.

iPhone 6 is Default-375w-667h#2x.png when you don't want to use the Info.plist

Related

Add additional preview devices to storyboard Xcode 10+

Is there a way to add additional preview devices to a storyboard?
In this case, my preview device display does not contain iPhone 7+ and iPhone 6 - iPhone 6s+.
There doesn't need to be a separate iPhone 7 plus entry, because iPhone 8 plus is there, and is the same logical size.
There doesn't need to be a separate iPhone 6, 6s, or 6s plus entry, because iPhone 8 is there, and is the same logical size.

How to assign launch images in Xcode assets catalog?

Xcode's interface for assigning launch images into an assets catalog is rather confusing. Only 2 image slots are made available given the settings we've chosen (Portrait only, for iOS 8.0 and later) and yet the Apple docs list a variety of resolutions required for their various devices (6s, 6s Plus, 7, 7 Plus, etc.), 12 of them to be exact. I'm using Xcode 8.3 btw.
We are designing portrait images for commonly available devices, but how to assign them here? Notice pics below showing a confusing mismatch between the expected resolutions of images (straight from Apple docs) and the Xcode UI for assigning those images. There are only 6 slots available, and even if the Apple docs described only 6 images, it is impossible to tell which goes where.
EDIT: Deployment target is 8.3.
Depending on your deployment target, there's either 3 or 4 total resolutions you need to care about: 5.5" devices, 4.7" devices, 4" devices (e.g. iPhone SE), and if your deployment target is iOS 9 or below then 3.5" devices (e.g. iPhone 4S).
The "iOS 8.0 and Later" iPhone Portrait gives you the 5.5" and 4.7" devices. If you check the "iOS 7.0 and Later" iPhone Portrait option that will give you "2x" (which I believe is 3.5" devices) and "Retina 4" (which is 4" devices).
Using those 4 options you'll be able to cover all supported iPhones.
If you need iPad support, you can check the relevant iPad checkbox. However, it looks like the asset catalog doesn't offer a slot for either iPad Pro, I don't know why not. This answer suggests that for the iPad Pro you should ditch the asset catalog entirely and switch to free images and Info.plist keys.
You also don't need 12 images for 12 devices. A bunch of the devices share the same resolution. Here are the images you need:
2048x2732 - 12.9" iPad Pro
1668x2224 - 10.5" iPad Pro
1536x2048 - 9.7" iPad, 7.9" iPad mini 4
1242x2208 - iPhone 6s Plus, iPhone 7 Plus, iPhone 8 Plus
750x1334 - iPhone 6, iPhone 6s, iPhone 7, iPhone 8
640x1136 - iPhone 5, iPhone 5s, iPhone 5c, iPhone SE
640x960 - iPhone 4s
If you upgrade to Xcode 9 you'll also need an 1125x2436 image for the iPhone X.
If you would just use a launch storyboard like everyone else, you wouldn't be having any problem. You would just supply one launch storyboard: end of story.
EDIT As of iOS 13 and Xcode 11, this will soon be required. Launch images are dead. Your app must have a launch storyboard.

iPhone 5 device launching app as an iPhone 4

I´ve made an app, and I tested it on my iPhone 5, iOS 8.1.2 It worked perfectly there, however when i tested it on my fathers iPhone 5s, iOS 7.1.2, the top and bottom of the screen were cut off, as if it was tested on an iPhone 4. Does anyone know what could cause this? Thanks in advance.
You need the 4" launch image. You must have the launch screen file which only works on iOS 8. iOS 7 requires the standard launch images.
You need to add your launch screen image Default-568h#2x.png to your project and set it to the Asset Catalog. This will work in both iOS 7 and iOS 8

How to make my app use a zoomed iPhone 6 resolution when using an iPhone 6+

I'm making my app work on the new iPhones 6/6+. Until now everything worked in zoomed compatibility mode, but I wanted to make some modifications for iPhone 6. Instead of migrating all my assets to #x3, I prefer that my iPhone 6+ version will still be in compatibility mode - but instead of using the old iPhone 5 version, it should use the new iPhone 6 version.
I inserted a splash scree image to iPhone 6, but can't get the iPhone 6+ to run in compatibility mode now:
Leaving it blank does not show a splash screen at all, and the iPhone 6+ still uses its own resolution.
Putting the iPhone 6 splash in the iPhone 6+ splash slot, also doesn't show a splash screen, and the iPhone 6+ still uses it own resolution as well.
Is it even possible?

Enable iphone 6 resolution not enabling iphone 6 plus

I am trying to support iPhone 6 resolution without supporting iphone 6 plus yet.
What I tried already is to add launch image for iphone 6 - Image.xcassets called Retina HD 4.7. Unfortunatelly simulator for 6 plus is reporting 2208x1242 screen size (already multiplied by 3). So 6 plus is supported with just 6 launch image.
I am wondering if its just a simulator bug or the same behavior is on actual iphone 6 plus device - I do not have access to such device yet.
Funny thing: when I added just launch images for 6 plus then simulator for 6 is not starting in 1334x750, instead its 960x640 (when retina 4 launch image is not provided) or 640x1136 (otherwise).
Anyone knows how to support just iPhone 6 resolution not iphone 6 plus?

Resources