Andre
Andre

Reputation: 51

Specific iPhone/iPad resources for in Universal App

I am building an Universal App, that uses many images. I have optimized the images for iPad and iPhone and my App is using the correct images on the different devices (defined by ~ipad and @2x tags in the files names). But as I can see, all images are allways distributed ty all devices. So my App consumes a lot of space with images that will never be used on the specific devices. Is there a way, to specify what images (or other files) to be distributed to the different device types?

Upvotes: 0

Views: 89

Answers (2)

Jesse Rusak
Jesse Rusak

Reputation: 57188

Other than distributing two apps, the other solution is to download the needed image resources at first launch, but this is clearly complicated. (And needs to handle the case when a device's backup is restored to a different device, etc.)

Upvotes: 0

Constantino Tsarouhas
Constantino Tsarouhas

Reputation: 6886

No. The only "solution" is to distribute two apps.

However, the “real" solution lays in the application's design. Most apps use the same images for both UI idioms (iPhone/iPad). They use things like "stretchable" images (see UIImage reference for more info) to not depend on the resolution. There are hundreds of other tricks you should consider to prevent to resort to many images that depend on the device.

If your complete image repository doesn't exceed 50 MB, you shouldn't care too much. (And if it does, you should check how to minimise it. 50+ MB is a bit much for a mobile device where 64 GB costs you a lot!)

Upvotes: 1

Related Questions