Totally confused about app-thinning - ios

From what I have been able to understand from Apple's documentation, there is a 100mb over-the-wire limit on downloadable apps from the app store.
Apple recently introduced 3x assets for iPhone6+, causing ridiculous levels of bloat in our applications. Thus, app-thinning... So the idea is, I add an asset catalog and put all my images in there, and then the app store will know when an iPhone 6+ user downloads the app, it will only give them the 3x and 2x versions (i'm assuming for zoomed / non-zoomed), and when an iPhone 6 user downloads the app, it will give them the 1x and 2x versions (i'm also assuming for zoomed / non-zoomed).
So the 3x users are really only saving space by not downloading the 1x size assets (which are small and insignificant). And the 2x users are saving space by not downloading the 3x size (which is significant)... However, my question is app-thinning is only available for iOS9.. So what does that mean?
An iPhone 6 user on iOS8 will not be able to download the app at all because they don't have app-thinning and therefore they would be downloading the entire collection of assets and it will exceed 100mb?
I am asking this question because I uploaded my cocos2d game build to iTunes Connect and it says its compressed file size is 172mb with a yellow exclamation point, so I am worried about this... In my case, I know the problem really comes from the 3x size art. I'm not currently using asset catalogs because cocos2d (v2.x at least) doesn't support them, and I don't want to bother adding support for that if it's pointless as I am thinking based on what I've described above...

App slicing takes place on the App Store Servers so devices running iOS 8 or earlier are still able to download apps, which have app thinning enabled.
The App Thinning Documentation states
Sliced apps are supported on devices running 9.0 and later; otherwise, the store delivers universal apps to customers.
If the size of the universal app exceeds 100MB, the user has to download it over WiFi. A method to lower the initial download size are on demand resources.
Note:
As the pixel density on the iPhone 6 Plus is higher than on other models, even when non-zoomed, only the 3x images are needed so the 2x images do not need to be downloaded so the iPhone 6 Plus users do save a little bit more.

Related

App Store Connect Mixing Screenshots and Previews

We are on the verge of uploading our first production app to the App Store. I have taken screenshots using an iPhone 8 (4.7"), an iPhone X (5.8"), and an iPad (9.7").
Now, I understand based on Apple's documentation that it is valid to upload these "alternative sizes" (aside: these alternative sizes are ~70% of iOS devices but I digress) and the sizes will be upscaled accordingly to the larger sizes of iPhone (5.5") and iPhone X (6.5", XS Max only as of this writing), and iPad Pro (10.5", 11", 12.9").
My issue is that the promo video for my app was produced at the conventional HD 1080x1920 (valid for 5.5") and 1200x1600 (valid for 12.9"). I can of course downscale these, but ideally I would like to keep the original higher resolution. So my question is: if I upload a mixed bag of assets, will e.g. an iPad Pro still display my preview video AND the upscaled smaller images from my 9.7" upload? Will an iPhone X, which has its own images but a promo uploaded only for 5.5" still show that iPhone 5.5" promo? In most general terms, can I mix and match sizes and expect the App Store to provide assets to the user appropriately?
I spoke with Apple. The short of it is that App Previews (video) and App Screenshots (stills) are separate entities, so you can mix and match. That said, according to the rep with whom I spoke they will never upscale images or video for you. So you should always use the largest device size. He suggested that any images I had in a lower scale I scale up in Photoshop and then submit.

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.

Device specific Graphics for Universal iOS app

I've configured my app as Universal in Target/General/DeploymentInfo
Is it ok to make device specific assets in the xcassets file for iPhone and iPad, even though the app as a whole is Universal? It seems to work, but I'm worried if there is some catch.
Background:
I plan to add 2X and 3X versions of some assets in the 2x and 3x boxes in the iPhone section, and 2X and 4X versions in the 1x and 2x boxes in the iPad part. I use a capital X to describe the scale of my assets.
Note, that the 2X asset will be used twice. Both in iPhone and iPad. Maybe there's a way around that?
Nothing wrong with this at all.
Where I work, we've done this for our games: different asset bundles are downloaded depending on the device the game is running on.
This allows us to adjust for older hardware, like iPad 2.

ios, publish different build per device

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.

Do I really need lower-resolution images for older iOS devices?

I am developing an iphone application and i am using a background picture for my app. I know that before iphone 4 , the resolution of the screen was 480x320 and after 960x640. I read that i should use 2 images like : MyImage.png and MyImage#2x.png with the 2 different resolutions and the app will know which one to choose according to the phone. My question is very simple. If i just use the 960x480 , whats the difference? I am developing on an iphone 3gs and i am using this resolution and everything works perfect. So why have a small resolution for these phones?
The difference, in my opinion, is the following: the phone is going to resize the doubled-resolution to half the size, and this will lead to (1) the final image is not as smooth as if you would have exported it from a image application like Illustrator or Photoshop - at least from my own experience, when I export both resolutions, in non retina devices, the images don't look as good if I had exported the normal resolution. Also (2) the device will waste time/performance to make this conversion, although I don't know how much it is significant. And (3) finally, you may overload memory with no need, considering that the doubled sized images are bigger files, and you could use smaller files instead.
If you don't mind about this issues, you can go ahead. Try yourself.
If nothing else, the high-resolution images will tax the memory much more. One full-screen image at 320✕480 is around 600K in memory, whereas the 640✕960 is almost 2.5M, four times as much. On the older devices the memory is much more scarce than on the new ones and you might run into problems later in the development cycle, when there are more resources in play.
Even if you are able to test the app on all older supported devices and you can guarantee that there are no immediate performance problems or visual glitches, the app will take more memory, forcing the OS to kill other apps more frequently (= worse overall user experience).
if you use one version of image, (960x640) , there will be a memory overhead when the app run on non-retina. you dont need to display the high res in non-retina, only in retina display, making two versions of images .png and #2x.png will tell ios which image version it should load, depends on what device is currently in use.

Resources