it's possible to change the icon of app based on the OS of device? [iOS 7 icon size and old iOS icon size are different]

Immediately clarify the situation, I asked this question simply for a reason. The new iOS 7 has dimensions of (some icons) icons slightly different from the previous iOS. I have posted below the old size of the icons and also the new dimensions for iOS 7

iOS old icon size
iOS 6

iOS 7 icon size
iOS 7

Now I ask you, can i change the icon of the app based on the OS installed on the device? (because now we'll create two types of icons to make sure that they fit perfectly for both the old OS and the new iOS 7, a problem that does not arise with an icon only with no background in borderless images that are close to the edges of the 'icon)


1 Answer

  • Yes! I think newest versions of Ti.SDK (latest 3.x's) automatically add them in the build of your app. However if you are like me and still work with older versions of the Ti.SDK you need to change some stuff in the ~/Library/Application Support/Titanium/mobilesdk/osx/SDK_VERSION/ :

    Find the line which says:

    iconorder = list(iconname+".png" ... etc

    and complete this with the following new icons (60.png, 60@2x.png, 76.png, 76@2x.png):

    iconorder = list([iconname+".png",iconname+"@2x.png",iconname+"-60.png",iconname+"-60@2x.png",iconname+"-72.png",iconname+"-72@2x.png",iconname+"-76.png",iconname+"-76@2x.png",iconname+"-Small-50.png",iconname+"-Small-50@2x.png",iconname+"-Small.png",iconname+"-Small@2x.png"])

    This part in the generates the bundleiconfiles property in the info.plist file. IT DOESN'T WORK if you add them manually to a custom info.plist file as this will still overwrite them. So do it (carefully) in the file.

    Now be sure to add the new icon files (with maybe a flat design, that's up to you) to your project Resources/-root or project's Resources/iphone folder.

    Good luck!