Image Assets catalog doesnt recognise retina 4 photos in xCode5 - ios

For start what I am trying to do i am not even sure that is possible(looks that is)
In the feature of image assets in Xcode you can select for an imageSet to be either Universal or Device Specific. When I am doing it Device Specific and select both iphone and Retina 4 and assign pics to all , it is always selected the iphone retina image and never the Retina 4 when I am using an iphone 5(device or simulator)
Have searched docs but couldnt find something.
Thanks

The "R4" image will only work on 4-inch iPhone running iOS 7 or later.
On older version of iOS it will use 2x image.
Example. If you use images like this:
you will see:
iPhone 5 iOS >= 7 - number 3,
iPhone 5 iOS < 7 - number 2,
iPhone 4, 4S - number 2,
iPhone 3GS - number 1,
iPhone 5C and 5S - number 3.

In my experience, this is the case whenever you do not target specifically iOS 7.0 in your Deployment Target as part of your Project/Workspace settings.
Targeting anything other than 7.0 seems to result in this behavior.
To clarify: this value essentially specifies the minimum version of iOS that is allowed to run your app. Specifying iOS 7.0 in this field will restrict use of your app/update to ONLY users with iOS 7.0.

Related

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.

How to take Iphone 4 screenshots with Xcode 8

This SO post gives the image resolutions needed for the Xcode Images.xcassettes when doing the launch image for the Iphone. One of the images needed is the 2x for the Iphone 4. However, since upgrading to Xcode 8, the target builds are only Iphone 5 and above. How do I get a screenshot from the Iphone 4?
Xcode -> Preferences -> Components
Install older version of simulator and iPhone 4S will appear in simulator list.
4 and 4S had identical screen resolutions.
P.S. You also need to set project deployment target to the older version you installed
Don't Take.
In XCode 8.0, You are set deployment target 8.0+, it means in You are developing apps for iOS 8.0 and later. iOS 8 and later will be compatible with iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPod touch 5th generation, iPad 2, iPad with Retina display, iPad Air, iPad mini, and iPad mini with Retina display. So it looks like the iPhone 4 is officially dead to Apple.
You are take iPhone 4S screen shot. if You are set the deployment target 8.0.

IOS version and retina support

What is the cut off for iOS version where I can say everything is Retina Display and I don't need to worry about the 1x images anymore? I want to say anything iOS 8 or newer is going to be Retina Display, but does it goes back further?
If your app is iPhone only, then iOS 7.
However for universal apps, iPad 2 and mini are still supported even by iOS 9.

Set App to run on iPhone 5+

Really simple question but can't find a answer anywhere. How do I set it so my app (iOS App Store) can only be downloaded by iPhone 5+? e.g iPhone 5, iPhone 5s, iPhone 6 and iPhone 6 Plus only. No iPhone 4s or lower.
There is no option for that. There is only option where you can set minimum iOS version.
You can set minimum iOS version from Deployment Target option.

Images.xcassets and IOS 5

My app is almost complete and i'm bug testing and fixing.
Now this is the first time i have used images xcassets and until now it worked.
When i'm testing on the simulator all icons look great, when testing on my test devices iPhone 5, iPad mini, iPhone 4 iOS 6 and iPad 2 iOS 6 everything looks great.
But when i test on the iPad 1 with IOS 5 the icon is blurry, but the ipad 2 uses the same icon set.
So i changed that icon to red (others are bleu) and on IOS 6 the icon turns red.
The iPad 1 does not change the icon so its using a different icon set.
How do i make the iPad 1 on IOS 5 use the iPad App IOS 5,6 72pt icon?
info about the icon:
1x size = 72X72
2X size = 144X144
Tried the naming convention.
(I removed the icon in the center, because the app is not yet released)
___________________________________________UPDATE___________________________________________________
After a while i stopped using the xcassets for my app. It's simply IOS 5 that is giving the problem.
It seems that Apple just want's us to stop with IOS 5, xcode 5 and mavericks just makes it too big of a deal to make iOS 5 apps and test them. I'm expecting to stop iOS 5 development next year.
I have the same problem with the iPad 1 and iOS 5.
But I found an unsightly workaround for this problem. Build your project for an iOS device and not for the simulator. Go to the .app file in the finder and open the package content (right click).
As you can see, there are the AppIcons for the iPad named "filename"~ipad.png and (if available) the AppIcons for the iPhone named "filename".png.
Remove the "~ipad" string from the image filenames and build your project again - should work no.
If your target also supports the iPhone, this solution won't work I think.
The same problem also comes up, if you set up a complete new project with XCode 5 and deployment target iOS 5 on the iPad. I've already reported this to apple.

Resources