Hacker News new | ask | show | jobs
by robomartin 5218 days ago
The landscape is getting a little messy for app developers. Not saying this is bad. It's just a fact.

Today you have to deliver .png, @2X.png and *~ipad.png image sets with your app. And, there is no off-the-shelf way to reuse @2X images with the iPad when in most cases they'll work just fine. You can, but it requires creative coding.

Still, this results in app packages that are bloated with image assets in triplicate and now soon to add a fourth version.

If you build a universal app it seems that even someone downloading your app onto an iPod Touch is going to end-up with @2X, ~ipad and ~ipad2X (or whatever) images that the app will never use.

Maybe this is the beginning of the end of the universal app?

6 comments

I was under the impression that not specifying a device modifier would allow the image to be used on both devices. From Apple's documentation:

Applications running in iOS 4 should now include two separate files for each image resource. One file provides a standard-resolution version of a given image, and the second provides a high-resolution version of the same image. The naming conventions for each pair of image files is as follows:

Standard: <ImageName><device_modifier>.<filename_extension> High resolution: <ImageName>@2x<device_modifier>.<filename_extension> The <ImageName> and <filename_extension> portions of each name specify the usual name and extension for the file. The <device_modifier> portion is optional and contains either the string ~ipad or ~iphone. You include one of these modifiers when you want to specify different versions of an image for iPad and iPhone. The inclusion of the @2x modifier for the high-resolution image is new and lets the system know that the image is the high-resolution variant of the standard image.

That said, it would be cool if Apple produced four different variants of an app and would send you the proper one depending on the device you download it on. When downloading with iTunes, your machine would download and store all four versions.

Maybe it marks a new rise in using vector image formats? (note: I am not an iOS developer and do not know the level of support iOS provides natively for vector formats)
You can render PDFs as UIImages[1], there are categories around that make this easy[2].

However, this is never ever going to be as cheap as loading a converted PNG (which Apple's modified pngcrush converts for you). I think a lot of devs have the draw/vector vs. precomposed bitmap tradeoff the wrong way round.

Drawing all of your gradated UIButtons with CoreGraphics methods is a false economy compared to just loading a stretchable PNG. Almost all of Apple's UI system imagery is bitmap based, and for a good reason.

[1] http://mattgemmell.com/2012/02/10/using-pdf-images-in-ios-ap...

[2]https://github.com/mindbrix/UIImage-PDF

Ugh, yeah, this is now a righteous mess. I don't see why a user's device has to be stuffed with payload that he/she has zero chance of ever utilizing.

All it does is bloat up the package and limit what devs can do and still remain in the downloadable-over-3G limit.

There's an open source view that'll let you use a single scalable PDF for things like icons: https://github.com/peyton/moomaskediconview

Disclaimer: I'm the author.

This (http://www.macstories.net/stories/retina-universal) article suggests a solution to the problem from the download-limit point of view.
Why doesn't App Store strip the app for each platforms? The DRM already blocks sideloading, so there is no concern about copying and app from Pad to Phone.