iOS app Icon - how to? - ios

Can someone explain me or link - I have 512x512 icon but I have no idea what icons sizes I need to create and how to add them in to my iOS app. What sizes I need and how to add them, and for what?

The Apple documentation has all you need to know.

In a nutshell: 57x57 for non-retina iPhone or iPod Touch, 114x114 for retina display, and 72x72 for iPad.

Ive put all the images named correctly at the correct size into a github repo, so there can be no confusion.
https://github.com/FattusMannus/iOS-Development-Image-Placeholders
Just download them as a zip, edit them and copy them into your project
AH

In the current 5.x xCode version you can use app icon set (AppIcon.appiconset). In the picture you can see where you can found it. Here is online tool, Icons Master, which will take care how icons should be big naming convection as well.

Specific name doesn't matter's any more for ios icon. All you need is perfect size.
I have created this application which will provide you all the icons based on information provided here. Get the application from here, and follow the instructions in readme file to create all the required icons for iOS application.

Download Asset Catalog Creator Free from iTunes. All you have to do is select a base image, and the program will create all required iOS icon sizes for you and place them neatly in an .xcassets file, which you can simply drag into Xcode without worrying about the sizes/resolutions of individual icons.

Question was asked a while back but the answer changes from time to time. Here are a few web tools that are updated with the latest requirements and get the job done:
http://www.theappicon.com/ or
https://resizeappicon.com/
Drag and drop the .xcassets folder that they return into your xcode assets catalog and it should populate your app icons as you need them.

Related

How to set the apple watch icon image in iOS

I want to add the apple watch app icon image in Glance option shown in iPhone(Please refer attached image).I have added all the appIcon images shown in asset file. But icon image is not visible in iPhone for glance option. So where to add icon image for this ? Thanks in advance.
2 Points:
Make sure that you have added your app icon in XCAsset of "ProjectName WatchKit App" folder.
Turn on car play as well. (I am not sure if it is required, but you can try.)
Just as an fyi make sure all icons are .png format and de-interlaced. Also no transparency on the Home Screen icon.
It may be a bit unclear, because if you use a standard XCode template App, you may find two Assets.xcassets. The first would be under the WatchKit App and the second one under the Watch Kit Extension, usually where you insert your code logic.
Well, check out the Assets.xcassets under the WatchKit App group-folder, that’s the one. You will find in this image assets the AppIcon group, fill the icons and you are good to go.
Original source:
https://www.jazzcoding.com/locate-real-watch-icons-assets/

iOS how to set app icon and launch images

How do I set the images so that I can archive and validate my app? The screen looks like this now:
So the first one says 29pt, but then it also says 2x. So do I put a 29x29 image or a 58x58 image? And where do I put all of the other ones? (I know that there are more sizes than 29, 40, and 60).
Anyway, what I tried was I dragged a 29x29 png onto the first slot, a 40x40 onto the second, and a 60x60 onto the third and fourth. When I went to Product->Archive, I get
/Users/kendon/Documents/iPhone Apps/Sales Tool/Sales Tool/Images.xcassets: The app icon set named "AppIcon" did not have any applicable content.
I recently found this App called Icon Set Creator in the App Store which is free, without ads, updated on new changes, straight forward and works just fine for every possible icon size in OSX, iOS and WatchOS:
In Icon Set Creator:
Drag your image into the view
Choose your target platform
Export the Icon Set folder
In XCode:
Navigate to the Assets.xcassets Folder
Delete the pre existing AppIcon
Right click -> Import your created Icon-Set as AppIcon and you're done
Update: Unless you love resizing icons one by one, check out Schmoudi's answer. It's just a lot easier.
Icon sizes
Above image from Designing for iOS 9. They are the same for iOS 10.
How to Set the App Icon
Click Assets.xcassets in the Project navigator and then choose AppIcon.
This will give you an empty app icon set.
Now just drag the right sized image (in .png format) from Finder onto every blank in the app set. The app icon should be all set up now.
How to create the right sized images
The image at the very top tells the pixels sizes for for each point size that is required in iOS 9. However, even if I don't get this answer updated for future versions of iOS, you can still figure out the correct pixel sizes using the method below.
Look at how many points (pt) each blank on the empty image set is. If the image is 1x then the pixels are the same as the points. For 2x double the points and 3x triple the points. So, for example, in the first blank above (29pt 2x) you would need a 58x58 pixel image.
You can start with a 1024x1024 pixel image and then downsize it to the correct sizes. You can do it yourself or there are also websites and scripts for getting the right sizes. Do a search for "ios app icon generator" or something similar.
I don't think the names matter as long as you get the dimensions right, but the general naming convention is as follows:
Icon-29.png // 29x29 pixels
Icon-29#2x.png // 58x58 pixels
Icon-29#3x.png // 87x87 pixels
Launch Image
Although you can use an image for the launch screen, consider using a launch screen storyboard file. This will conveniently resize for every size and orientation. Check out this SO answer or the following documentation for help with this.
Useful documentation
App Icon
Launch Screen
The Xcode images in this post were created with Xcode 7.
To save a bit time:
1) You can mark your app icon images all in finder and drag them into your Assets catalog all at once by dragging into one of the empty slots of the app icon imageset. When you hold your drag over the slot, several of the other slots look selected and when you drop those all will be filled up at once. Note that this works in XCode 8 (I haven't tried XCode 7), but in XCode 9 beta not yet.
2) The "Technical Q&A QA1686" apple documentation site has the sizes per app icon slot already calculated for you in a nice image and also contains the correct image names conventions.
I've tried most of the above and a few others and have found https://appicon.co to be the easiest, fastest, and provides the most comprehensive set.
Drag your image onto the screen
Click Generate
Open the file just downloaded to your Downloads folder
Here, you may be able to drag this entire folder into Xcode. If not:
Double-click the Assets.xcassets folder
Select all files
Drag them to Assets.xcassets
Rename it to AppIcon
The correct sizes are as following:
1)58x58
2)80x80
3)120x120
4)180x180
I use a tool called Prepo to produce all the right image sizes. You simply feed the app you image file and it will spit out each necessary file with an appropriate name.
Once you do this, you can then drag in the appropriate files or simply point to your Prepo exported folder.
Now a days is really easy to set app-icon, just go to
https://makeappicon.com/ add your image, they will send you all size of App-icon (Also for watch & itunes as well), now Click Assets.xcassets in the Project navigator and then choose AppIcon. Now you just have to drag n drop the icon as required.
I found App called Iconizer. You can find repository on github. Iconizer can generate app icons for OS X, iPad, iPhone, CarPlay and Apple Watch with just one image.
Simply Drag and Drop your icon onto Iconizer, select the platforms you need and whether or not you want all platforms generated into one asset catalog, then hit export.
After that just replace (delete and import) your AppIcon in the Assets.xcassets
In the left list, right click on "AppIcon" and click on "Open in finder"
A folder with name "AppIcon.appiconset" will open.
Paste all the graphics with required resolution there.
Once done, all those images will be visible in this same screen(one in your screen shot). then drag them to appropriate box.
App icons have been added.
Same process for Launch images.
Launch images through this process are added for iOS 7 and below.
For iOS 8 separate LaunchScreen.xib file is made by default.
I quite like this app made by Jordi Bruin called Bakery
It allows emoji and SFSymbols for quick prototyping (not for the App Store in this case!)
It is as easy as drag and drop your design to the app and then again drag and drop to the asset catalog without having to fill in all the sizes by hand.
This is a very frustrating part of XCode. Like many, I wasted hours on this when I switched to a newer version of xcode (version 8). The solution for me was to open the properties for my project and under the "App Icons and Launch Images" choose the "migrate" option for the icons. This made absolutely no sense to me as I already had all my icons there, but it worked! Unfortunately I now seem to have two copies of my launcher icons in the project though.
As per updated version(Xcode 8.3.3) I saw that below resolution are required for all fields of AppIcon sets.
40x40
58x58
60x60
80x80
87x87
120x120
180x180
It comes with hdpi, xhdpi, xxhdpi etc.
Hope it will helps others.
Edited to 120x120
You can easily do it without resizing yourself or doing anything, just choose your icon at an app store icon generator website
https://getappscreenshots.com/app-icon-generator and it'll generate all required files and all icon sizes so you can just copy the files and paste in your project's folder!
You can get away with just adding a single image of size 1024*1024px.
Just add the image in like so
and select single size in the menu to the right.

iOS 8 action extension icon is blank on device (works in simulator)

Edit2:
I've distilled the problem down to the simplest project I can. Here's the setup.
I created a new single view app and immediately added a new Action extension target. I created a new icon set in the .xcassets file and added an iPad retina sized icon (I've tried filling in all the icons, the results are the same).
I made sure to include Images.xcassets in the Copy Bundle Resources build phase:
And then when running the app in the simulator everything works!
Compiling to device however results in a blank icon:
I thought maybe that means something is wrong with the PNG file I'm using, but everything looks OK here too:
Has anyone encountered similar?
I've already visited questions like this looking for an answer and I think I'm doing everything right but I'm still not seeing an icon in the action sheet.
Here's what I've done:
Created a working container app that has a working app icon stored in Images.xcassets. Then I created an Action Extension Target as a member of the same project.
Added Images.xcassets from my containing app to my extension's "Copy Bundle Resources" build phase. I know that this worked because I'm able to load images from the .xcassets file using UIImage.imageNamed(...) in my extension.
In the General Tab of the settings for my extension I've pointed the "App Icons Source" under "App Icons and Launch Images" to point to Images.xcassets's resource called "AppIcon", the same used for my containing app.
When that didn't work I did some further reading and discovered that Action Extensions require an "alpha mask" style image. I created another item in my .xcassets file called "AppIcon-2" and populated it with all sizes of app icon, except as a 1-color + transparency PNG. I pointed "App Icons and Launch Images" of my extension to this new "AppIcon-2"
Still my action extension's icon is a blank white square. Are there any steps that I'm missing? Is there some very specific format the alpha mask has to be in? (I'm just saving as a .png in photoshop). Is there some very specific name the resource has to have in .xcassets?
I'm also confused by some of the answers (like the one linked above) which seem to imply that the issue is resolved by adding .xcassets to the build phase. Aren't most app icon's completely opaque? How does iOS generate an alpha mask from a completely opaque app icon?
Edit: I'm not entirely sure what change made the difference (I'll try to deduce it and update this post if I figure it out) but I'm now seeing a working icon based on the alpha mask of "AppIcon-2" on the simulator. I hadn't even thought to check the simulator but it does prove that the icon is being pulled from the correct place. Something about the device is processing the image differently.
EDIT: Apple Fixed this issue in iOS8.1!
------------ OLD ----------------------
I think at this point, the answer is to submit a bug report to Apple at
https://feedbackassistant.apple.com/
If you can submit your barebones example project, that will help our cause!
Here's the one that I submitted:
Summary: The action extension icon shows well from Messages, and the
UIActivityViewController, but when it appears from the Photos App, the
icon is blank.
I think this is a bug with the Apple Photos App
Steps to Reproduce: Follow these instructions but from the Photos App
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Expected Results: Expect the Metadata Extension's icon to appear
correctly as in
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Actual Results: The icon is pure white
Version: iOS 8.0.2, iOS 8.0.0
Notes:
iOS 8 action extension icon is blank on device (works in simulator)
Here is an example of using my extension from Messages App, with the
icon showing correctly:
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
But doing these steps from Apple's photos app, results in the icon not
showing correctly.
Configuration: Any iOS device running iOS8. iPad 3rd Gen, iPhone 5,
iPhone 5c, iPhone 6 Plus
Attachments:
Edit:
They closed it as a duplicate of ID: Ticket ID: 17208813
Progress!
You didn't mention the extension's Info.plist settings, so I assume you didn't include an entry for the icon file. You'll need to add a key named NSExtensionServiceToolbarIconFile in the NSExtensionAttributes dictionary. The value is the name of the icon file.
At least that's how it's supposed to work. In practice it seems that you currently need to have a top-level CFBundleIconFile key with the icon's name. Supposedly that's only used if NSExtensionServiceToolbarIconFile isn't present, but at least for now it's necessary. I have both, which is probably not necessary, but I'd prefer to leave the key that's documented as being correct in place in case it starts working at some point.
I had the same problem. What worked for me was to follow Tom Harrington's answer, but then also make sure the 'Target Membership' (right side pane) of the extension icons includes both the extension target AND the app target. (Under Build Phases, it should be listed under Copy Bundle Resources for both targets as well.)
Also, note that your extension icons must have a fully transparent background, NOT solid white. Any white, or any colour other than transparent, will be rendered as solid dark grey.
Hope this helps. Sorry, I wanted to add this as a comment to Tom's answer, but Stack Overflow wouldn't let me because of my reputation.
We have the same problem for our Yarnee App. But I figured out that beside Camera Roll, the icons work on other Apps, for example Dropbox, see this screenshot:
It feels a little bit like a bug...
To get this to work with my existing Asset Catalog, I had to add the following to the extension's Build Settings:
The name of the set in my Assets Catalog is "ExtIcon". I had tried setting the CFBundleIcon and the NSExtensionServiceToolbarIconFile keys in the info.plist for the extension, but had no luck. This actually seems to make sense since it is the same way that icon sets are linked to the container app, not via info.plist, but via the Build Settings.
Problem seems to be solved on iOS 8.1.

XCode5 won't accept all my icons and launch images

After switching to XCode5 I've just re-done all my icons and launch images for an app, with the exception of retina launch images I should have a complete set for both iPad and iPhone, iOS6 and iOS7, thanks to this tool: http://www.appiconsizes.com/
But XCode5 absolutely refuses to use them all. I removed all the old images from my project and added the new ones. Some, XCode automatically detects, seemingly at random. Many others, it says it can't find the images needed even though they are named according to Apple's guidelines (as far as I can see, it's all a bit confusing with so many variants). It lets me find them manually but doesn't seem to be using them properly.
And my launch images, it insists on using images from a different target even though these are definitely not marked to be included in this target. It won't even let me change those ones, if I try to then it just ignores my selection.
A few screenshots follow. I originally had just an "Icon" icon identifier in my plist, since Apple say it will automatically detect different variants, but XCode has then added Icon-76 and Icon-120, seemingly contradicting this. I'm aware XCode5 supports controlling things more through your plist than XCode4, but shouldn't require that - you should be able to tell it the icon base name or use "default" and it would figure things out?
Use an asset catalog for your project.
It has placeholders for the launch image and the icon and each one tells you which size it needs.
Much easier than handling lots of dirrefent files in different locations.
In the project info page there is a button that says "use asset catalog". It will import all your images for you. The code doesn't change when using an asset catalog so it will all still work.
Another thing with asset catalog is that the name of the files doesn't matter. You just drag the image to the slot you want it to go into. With icons and stuff there is only a size restriction.
Even for retina images you don't need the #2x before because there is now a slot for "standard" and "retina" images.
I guess the problem is in Your icon Name,
for iPhone retina Name should be Icon-60.png , Icon-60#2x.png
So as Fogmeister suggested use asset catalog
Like
So its like

Icon dimensions don't meet size requirements no matter what

I am trying to put my app on the market and am granted with this error everytime I try:
Ipad: icon.png: dimensions (57 x 57) don't meet the size requirements. The icon file must be 72x72 pixels in .png format.
I have seen the endless posts about about modifying the .plist and also Edit Project Settings -> Build -> uncheck Compress PNG Files( Icon.png file error in universal app ). I have done both of this. I have also went through apples guide for universal app Icons and followed that as well. However I noticed a difference in the .plist file I have and they have (http://developer.apple.com/library/ios/#qa/qa1686/_index.html). (Mine has a Primary Icon attribute ) Is there something I am missing or is the apple documentation our of date?
When I change the icon to 72x72 I then get the same error except it says the icon file must be 57x57. It seems like it's trying to use icon.png for both the iphone and ipad icon when It should be using icon-72.png for ipad and icon.png for iphone. Is this defined somewhere else?
First of all I'm not sure if this is a rule or if it's just common practice, but your icons should start with a capital "I". Second, your iPad icon should be 72x72 not 57x57 like the iPhone icon. And finally, you're missing your iPad retina icon "Icon-72#2x.png" 144x144px.
Full break down of icons.
Icon.png = 57x57 iPhone non retina
Icon#2x.png = 114x114 iPhone retina
Icon-72.png = 72x72 iPad non retina
Icon-72#2x.png = 144x144 iPad retina
If you make sure your icons are exactly as I've listed then you won't have any problems.
If you are still experiencing problems after making these changes then try deleting all icon images from the project, and deleting the icon keys from your .plist file.
Then re-add the images to the project by dragging them directly to their corresponding placeholder in the summary tab of Xcode's navigator.
Well, I agree with #NSPostWhenIdle, But as far as the Naming conventions he is right, if you are adding directly to the plist,
But when it is concerned with Xcode , from Xcode 4.2, when you open the target settings -> Summary
I hope that you are using Xcode later than 4.2
And when you mouse over the App Icons section, it will show the size of icons and right click there and add icons. Xcode itself fix the names for your icons according to the size of the icons which you are selecting like this
So, No matter of fighting with the naming conventions of iCons, and if you add like this, these icon names are fixed my Xcode itself and these icons are automatically added to the plist File as well.
I removed the icons from my project via the file system, renamed them as suggested by NSPostWhenIdle and sree charan. I then dragged and dropped them into the the app icon section and removed and readded the entries in the .plist via a text editor. However this still wasn't effecient enough, I thought that removing the files from the project in the file system would remove the references in the project, THIS IS NOT TRUE. I suggest to anyone that with icon problems after this to do what I previously stated and remove all icon references/files via the project and NOT the file system before re-adding.
Your icon.png is probably not exactly 57x57. in finder, right click on the icon.png, get info. If it still says 57x57, then I am not sure why its throwing that error.
I had a similar issue when my icon.png was 57x56 (which I had never checked until xcode whined).
IF these dont work, restart your Xcode and or Mac, make a clean build.
I just want to add (for others finding this question) that I recently ran into this error, but in my case it was complaining that 76x76 did not meet the requirement of 72x72, which didn't make any sense to me since our iPad app is iOS 7 only and therefore according to all official documentation only requires icons of size 76x76 and 152x152.
Icon dimensions (76 x 76) don't meet the size requirements. The icon file must be 72x72 pixels, in .png format.
Anyhow it turned out the person uploading the binary was using an older version of Application Loader (from Xcode 4.6) and this check was happening client-side before the upload even took place.
Submitting the same binary using the newer Application Loader from Xcode 5 had no problem!

Resources