I am planning an app for iphone 3g, 3gs and iphone 4. I have a 57*57 image for 3g and 3gs. When I checked documentation apple suggests us to use a 114*114 image for iphone 4. So how can I support both the images with the same build.
Use the CFBundleIconFiles property in your Info.plist and supply two icons, you name the high-resolution one with an "#2x" suffix so the iOS knows it's the high-resolution icon to use on iPhone 4. You can also specify iPad icons (for apps that run on iPhone and iPad) using the same property. This is documented here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BuildTimeConfiguration/BuildTimeConfiguration.html
Call the iPhone 4 icon Icon#2x.png
http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
You have to list all your icons in your Application's plist, and name the ones for iPhone 4 "Name#2x.ext" (add '#2x' to your file's name).
If you place the original icon and an icon with the same name but add #2x to the end of the name in your resources folder the correct one will be used automaticly.
The collection of different possible icon sizes for iOS is getting pretty long now. But all you need to do is to list all of the files in your app's Info.plist in the CFBundleIconFiles key, and the OS will do the work of picking the correct size.
Related
Xcode 5 tries to be smart about what icons my app needs.
I have a non-universal iOS 7 app. Xcode only lets me specify icons for the iPhone, but none for iPad. Previously you could still add iPad-specific icons so it looks better on iPad.
Also Xcode doesn't list the 512x512 and 1024x1024 "iTunes Artwork" icons which are still a requirement according to iTunes Connect Developer Guide / iOS 7 HIG.
Like you can see in the above screenshots only 3 Xcode lets me specify only 3 icon files.
Where can I specify the big iTunes Artwork icon if not in the icons asset catalog?
In your assets file (usually Images.xcassets / Assets.xcassets) go to the Attributes inspector on the right sidebar. Make sure iPad is ticked:
In later versions of Xcode, instead ensure an iOS (not "None") is selected on the iPad dropdown:
You need to select the AppIcon inside the asset catalog and bring up the properties navigator. In there you can add iPad assets for both iOS7 and pre-iOS7 and also specify whether the icons are pre-rendered or not.
I'm adding a couple of pictures to my project for a slideshow which runs static in the background. But I have the feeling that I don't name the images accordingly.
I support iOS 6 - iOS 7 therefore (if I knot getting this wrong) I have to create 3 variants for the three different screen sizes I have to deal with.
default.png (iPhone 3Gs)
default#2x.png (iPhone 4 / 4s)
Those two work great but I'm struggling with name for the iPhone 5 (4 inch).
I tried default-568h#2x.png and default#2x-568h.png.
Has anyone found a way to get this working? There are literally no examples/explanation in the docs.
Thanks in advance :)
If you are using Xcode 5 you can still use the asset-catalog to support iOS 6, you just need to drag the images on to thumbnail locations in the asset catalog, and then it doesn't matter what they are called.
If you are supporting down to iOS6, it even gives you placeholders for iOS6 specific images.
If you aren't using the Asset Catalog be sure to use the correct case for the image names which are:
Default-568h#2x.png
Default.png
Default#2x.png
The filesystem on the device is case sensitive, while the file system for the simulator is not, so you need to be sure to get the case correct.
Add the file for your splashscreen with the name you like :
Default.png
Default#2x.png
Default-568h#2x.png
And add the key Launch image in your info.plist`.
But, as suggested by #Abizem, with XCode 5 is easier to use the asset-catalog.
I've created an application for iPhone with icon versions for retina and no-retina display (icon#2x.png and icon.png).
Whenever I try to install this application on an iPad 3 a part of Default#2x.png is used instead of icon#2x.png.
Have i to upload specific icon for iPad ? and in this case where!? from Xcode 4.3.2 I see only 2 spaces to include icons, but reserved for iPhone version. I suppose that i need to create a new voice into plist file... but I'm not sure and documentation didn't help me.
I ran into the same problem. I created the resource files Icon-72.png and Icon-72#2x.png in the root of the bundle and added them to "Icon files" in the Info page of the target (Info.plist). Strangely, this didn't do the trick.
My final solution was to convert the target temporarily into an universal app, drag the iPad icons into the corresponding slots of the target's summary page and build it. After that, revert the target to an iPhone/iPod touch app, clean it, built it again.
Interestingly, this seems to work.
Old question, but with Xcode 6.3, if you use assets catalogs, select AppIcon, tick iPad (for iOS 7 and up) and add your 76x76 and 152x152 icons to the catalog
I would create 2 more icons called
icon~ipad.png
icon#2x~ipad.png
The first one will allow for iPad 1/2, and the second one will allow for Retina iPads (iPad 3).
Adding those 2 icons may be enough. Also, try a Clean & Rebuild as Luke said.
Hope this helps =)
I think you should use Icon-72. i used that
When determining the appropriate App-Icon the OS searches the "best fitting size" Icon in the CFBundleIconFiles array or the CFBundleIcons in the Info.plist. If the Default(#2x).png is in one of those arrays, it is selected for best fitting on iPad Retina. Solutions:
Eliminate the Default(#2x).png from this arrays. For the Launch image there is another property. If you do that, the iPhone Retina Icon will be selected.
Optionally add the iPad resolution Icons (72, 72 / 144, 144) to one of those arrays. Then the OS will determine one of those as best fitting.
For the Info.plist keys see also:
https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW1
Consider, that the naming of those Icon files are only relevant for older iOS versions. In new versions, the OS just searches for sizes in the mentioned arrays.
My app's icon is named:
appicon57x57.png
This works great on simulator and device. I don't have a retina device to test on. But if I make a 114x114 version of my app icon and call it:
appicon57x57#2x.png
and put in in the same place as the other icon, will it show on the retina devices?
As long as your Info.plist lists the app icon name as appicon57x57 (as it should since you say it works), and you make sure to add the appicon57x57#2x version to your project (and its build target), then yes, Retina Display devices should detect the appicon57x57#2x version and load that one.
Our CEO wants our iPhone app's icons to look correct (ie not scaled) on both the iPad and iPhone. He does not want to actually create separate versions, or a universal version of the app. The app will remain iPhone only, but the icon would need to show up proper on both devices.
This is a "business decision", and I think its rather silly but regardless - is this possible? OR would we have to create a universal version?
No. You have to create all the 72x72 (iPad), 57x57 (iPhone) and 29x29 (Settings, if you have one) icons, if you(r boss) don't want scaling.
And you need to create a 512x512 version to submit to AppStore anyway, so I don't see a reason to avoid an extra image.
To use the 72x72 icon for iPad, see How do I specify both icons for a universal iPhone/iPad app?.