I use a icon.png file of size 57*57 and a icon@2x.png file of size 114*114 as app icons. When building as a normal app, which is installed at /var/mobile/Applications, everything seems normal.
But when I build it with iOSOpenDev, installed at /Applications, the icon turns a little bigger than others (the right icon).
Any ideas? How can I set the icon's size to normal?
I've noticed this before, too. It isn't just an iOSOpenDev issue. I see this with jailbreak apps installed to /Applications
, not built with iOSOpenDev, too. I'm not sure, but here's what I guess is going on:
With iOS apps, you can choose whether or not the OS should apply a gloss effect to your app icon by setting a flag in your app's Info.plist file:
<key>UIPrerenderedIcon</key>
<true/>
So, obviously, the OS is not just displaying app icons the way you originally drew them. I'm guessing that the OS also applies a standard shadow effect to app icons, at least for normal app store apps (installed in /var/mobile/Applications
). The difference is that this effect is not optional for those App Store apps.
Looking at a screenshot off my jailbroken Retina iPhone, it appears that iOS is reserving 120 pixels (for Retina devices) for the app icon, and if you simply provide a 114x114 icon image, it will scale it up. That's what you're seeing.
So, try making your app icon 120x120 pixels. You don't need to change the actual rounded rectangle square. Simply open it up in a photo editor, and increase the canvas to 120x120. The extra space should be transparent. It appears that you don't want the rounded rectangle to be centered, but instead have maybe 1 pixel of transparent space above it, and about 5 pixels of transparency below it.
Rebuild your app with the Icon@2x.png
at this larger 120x120 size, and see how it looks.
If you really want to get it perfect, I think you're also going to need to draw in the shadow effect yourself. The light source is from the top, so the shadow should be below the icon.
Note that for jailbreak apps installed in /Applications
, your app icons absolutely can have transparency (and PNG supports it). It's just App Store apps that Apple doesn't want using transparent icon images.
Here is the app icon from Cydia, found on your filesystem at /Applications/Cydia.app/icon\@2x.png
. As you can see, it comes with the gloss effect and the bottom shadow embedded in the image: