Do universal binaries contain all the heavy ipad graphics in the App Bundle on the iPhone? What to do about it?

StackOverflow https://stackoverflow.com//questions/9611617

Question

Since the iPad 3 has a retina display, I start to worry about the amount of "image spam" in universal binaries on iPhone and iPod touch devices. Obviously they don't need those resources.

I never really checked, but maybe someone knows this: When an iPhone downloads a universal binary, does the App Store automatically ship a version where all the heavy iPad graphics have been stripped out? Or is the iPhone or iPod touch flooded with content that's only needed on the iPad?

Are there any ways to make a universal binary "intelligent" such that iPads only receive iPad resources while iPhones only receive iPhone resources?

In my case I have a 10 MB universal app. Upgrading this to retina iPad would mean iPod touch users will suffer from doubled file size.

Was it helpful?

Solution

No, nothing is stripped from the app bundle when you install on different devices. Remember, the whole thing is codesigned, so nothing can be stripped or the signature would be invalid. The standard advice here is to just live with the fact that your customer is only going to actually be using half of the resources in your app bundle (or a quarter if you don't share resources between iphone and ipad). If this is a dealbreaker for you, you could consider downloading the necessary resources from a server under your control on first launch, but remember that this makes things very complicated for you, and is actually a pretty poor user experience. You almost certainly want to just live with the increased size.

OTHER TIPS

The thing to do is just skip the non retina images because iOS automatically scales images down from their @2x form. Although this may cause slight lag, it is worth it because it will keep the IPA size down and users happy. But if you are doing a game where FPS matters greatly, then you are just going to have to bite the bullet and put all the graphics in there for all devices.

There really wouldn't be a great way to do this that wouldn't be annoying to the user. Saying that, you could potentially ship it with just iPhone graphics (or none at all) and then on first launch it would download all the images from a server that are necessary for whatever device it's running on. Like I said that really would not be a good way to do it though. Sticking with the large initial download seems the best in my opinion.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top