ios, publish different build per device - ios

Google Play allows different apks per screen density, does Apple Store support this?
I'm sure the info is somewhere, but all I find when I search are people asking how to develop one app to support all devices.
I know how to do that already, but this specific (top secret) project will be 1000 times better if I can release one super optimized version for each screen resolution... but I'll settle for density or device (generation and type) if needed.
I don't have access to XCode (no Mac) to check options currently.
Bonus points: If possible, is Apple going to frown on this and possibly reject my app because of this?

This can't be done. If your app supports the iPhone then it must support both 4" and 3.5" inch iPhones. If it supports only iOS 7 then you can avoid non-retina devices because only retina devices can run iOS 7.
But if you support the iPad you must support both retina and non-retina.
You can have one app (Universal) that does it all or you can have separate iPhone and separate iPad apps. But the iPhone app must support both sizes and possibly both types (retina and non-retina) of screens. And the iPad app must support both types of screens.
Apple won't accept apps that don't support the differences.

It should also be pointed out that in the Interface Builder part of Xcode, you setup the UI with points and not pixels. So, for an iPad, when you place a button, you do not have to specify retina or not. On a Retina screen a point is 2x2 pixels and on a non-retina screen a point is 1x1 pixels. Also, with image assets, you have a single image asset you ask for in code, but you add multiple copies of the image in the image assets. Like the retina and non-retina copies. If you have an image named cat.png, for retina this would be cat#2x.png and for non-retina it would be cat.png. But, in code or the inspector you would reference it with imageNamed:#"cat" and Objective-C is designed to handle the rest.

Related

Assets.xcassets - Universal not working

I am using Universal for Assets.xcassets in the hopes that I only have to create 3 different sizes for each image I use. But, despite Assets.xcassets telling me that my images are Universal in the Attributes Inspector, when I test on my iPad, the images are blurry and aren't as sharp as they are on my iPhone, making me question why there is a Universal option.
I've double checked all my images and they are all correctly sized.
My questions:
In the Attributes Inspector, under Universal, there are iPhone and iPad options. In order for my iPad to provide crystal clear images, should I use the iPad option?
And if I should: What's the point of the Universal option if it doesn't really do its job?
Also if I should: What size images do I use. The iPad option gives me the options of 1x and 2x size images. So, should the size of the 1x image for iPad be the same size as 1x image for Universal?
Thanks in advance.
Universal merely means that this app will run on iPad and iPhone natively. Thus the devices on which your app might run can have a single-resolution, double-resolution, or triple-resolution screen.
If you have checked Universal, accordingly, you should see three slots:
Your job, therefore, is to make three versions of your image, sized in proportion. If the 1x is 100x100, the 2x should be 200x200 and the 3x should be 300x300. The version in the appropriate slot will be used at runtime in accordance with the screen resolution of the device we're running on.
The asset catalog does not do any image sizing for you. You have to do it beforehand. (I find Graphic Converter a nice utility for this purpose.)
You could just supply a 3x image and allow the runtime to size down for you, but this is a waste of memory; Apple specifically advises against this in one of the WWDC 2016 videos. So just bite the bullet and make all three image sizes yourself.
Finally:
when I test on my iPad, the images are blurry and aren't as sharp as they are on my iPhone
Hmm, the only reason I can think of for this is that your app is not running natively on the iPad, but is an iPhone app running in "emulation mode" on the iPad. If that's the case, nothing you can do is going to make it look really good. It would be better to write your app as a true Universal app. That is a setting that you make when you create the project initially (though it can be changed later by editing the app target).

do I need to include #1x images of app only runs on iphone 4s and above?

Is this still necessary? 2x and 3x seem to be the only images I need based on models I support. What is the correct approach?
If your app is targeted for iOS9 or less then you still have to build for the iPad 2 which does not have a retina display.
http://www.evad3rs.net/2014/10/ios-9-supported-devices-compatibility.html
Even if you're building an iPhone only app they will run on an iPad.
You cannot restrict your app by device. So if you're supporting iOS9 or less (which is every OS version) then you should include #1x images for this reason. If you don't then the #1x devices will just display scaled down versions of the #2x images so you don't NEED to include them... but you should.
What you can do instead (which is something that I have been doing more and more recently) is to use an app like PaintCode. This will take your images and turn them into code. This code is then imported into your project and the images are generated at runtime by the code. They are completely resolution independent and it reduces your app bundle size as you don't have to bundle in any images.
According to IOS Human Interface Guidelines all IOS high resolution devices below IPhone 6, use 2x form of images. So if your app will not run for non-high resolution devices, I am guessing you don't have to add 1x version of images.
Here's the thing, apple reviewers always test your app on the latest and greatest device. They will certainly test your app on BOTH iPhone and iPad using the latest hardware. They don't have time to regression test your app on every possible device (ipad2, iphone3, iphone4, iphone5 etc). Your users on the other hand will let you know when things don't work as not everyone is on the latest hardware.
Now when you create a project you are required to provide icon images. I am sure you know this screen in Xcode. You can see there are places for 1x images. What happens if you don't provide 1x images? Go ahead, archive the project and try to upload to itunesconnect. You will most likely get a validation error that certain images are missing.
Like other said you cannot restrict your app from running on iPhone 4 Vs iPhone 4s and your binary will be stopped from upload if any required images are missing.

Non retina images – must I add them to xcode?

Because I made app (iphone) myself, with 200 images, I want not using non retina images.
It may be for me big problem to resize images for non retina display.
I don't have non retina display iphone, to test it.
Must I add non retina images to xcode, or not?
If I don’t add them, must I add “#2x” to all images for retina?
I tried my best to find answer for my question but there was no clear answer.
Thx for answers.
I thing it will be better make non retina display images, than buy non retina device for testing how it looks.
I have another question:
Button background needs #2x images and non retina display background images?
You must add non-retina images if the platform your targeting includes non retina devices (e.g. iOS 6 and earlier or iOS 7 iPad). If you do not, non-retina devices may not render your app correctly.
If you are not targeting a platform that supports non-retina devices (Eg iOS 7 iPhone), you may omit non-retina images. Your retina images will still need the "#2x" suffix in the file name for the system to find them.
I read somewhere that if you do not include non-retina images, the iOS will use the #2x images, scale them on the fly to non-retina sizes, but that may affect performance. Make sure you test on at least one non-retina Device to make sure it works.
This should not be too much of an issue. Test your app on the simulator using non retina and make sure your images are showing up properly. Your images should scale and won't cause a problem. It would be better if you could have both retina and non retina images but not a game beaker.

Different image sizes for iOS development

According to this link, would I need four different version of the same image size? Originally, I only created one for the iPhone 5, and I used the autosizing feature on storybuilder to resize the image correctly on iPhone 4s and below.
Concerning the four resolutions (***#2x.png): As it is described in https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1 you have to resize some images, for example the App Icon has to be high- and low-resolution,
If you need to support standard-resolution iPhone or iPod touch devices
(Source: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1)
For the other Images, it is not necessary, but as "ta.speot.is" described in https://stackoverflow.com/a/12549329/1113407 it is better if you do it yourself.
And "JustSid" comment
Why should already slow devices do even more work?
(Source: https://stackoverflow.com/a/12549329/1113407)
put it straight: The older devices which do not support retina display are slower and at most times (own experience) your app won't run fluently on those if you do not prepare the app.
Concerning the iPhone 5 vs iPhone 4S:
You need some images in both heights, as it is mention in https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1.
As the iPhone 4S has got the Apple A5-Chip and doesn't have to resize the image, as it has got an retina display, other images don't have to be resized. Therefor you could use the storybuilder-feature... But you have to ask yourself if the app should run on an older, non ratina display device...

What resolution do I need to make images for universal iOS apps in?

I am making a Universal app on xCode 4.4, using Storyboards. I am making the images for this app in Photoshop. I want to make a background image that fills the whole screen.
What I want to know is:
What resolution do I make the images?
Do I need 1 for iPad and 1 for iPhone, or more?
How do you make it work with the iPhone 5 as well?
You might need up to 10 background images:
There's the retina iPad: 2048x1536, non retina iPad and iPad Mini: 1024x768, retina iPhone: 640x960, non-retina iPhone: 320x480 and the new iPhone 5 (retina only): 640x1136.
That's 5. If you want to support both landscape and portrait, then you have 10 combinations.
PS: If you decide to keep the status bar visible (as most apps do), then reduce the height with 20 pixels (40 pixels for retina displays). That's how much room is needed for the status bar.
You should consider the approach of using only one image. The user experience of most apps is poor if you dont respect the available canvas size.
And you might want to focus special areas of your artwork to the user.
I would propose you to implement different scenarios at least for iPad and iPhone.
The resolution itself is described within the specs. So use one for iPhone and one for iPad, the different logos are posted in two resolution, with a postfix #2x or for the new Appstore dimensions with another prefix, but all these details are within the specs.
My experience is that in most cases you have to organise the user interface separately in order to provide a good user experience.

Resources