![]() For example, the icon would be dragged to the location that indicates “2x 60pt”, as shown below: The names line up with where you will place them on the AppIcon canvas. The names we created are arbitrary, when you add them to your XCode project they will actually be copied and embedded into the project. These are the files that you will drag into the XCode Images.xcassets folder to provide icons for your application. The automator service will begin creating copies of the original and resizing them to the dimensions that will be loaded into your XCode project. Okay, now take your 1024×1024 icon (which in our screenshots we’ll call icon.png), place it in its own folder (this is important to keep everything organized, otherwise the Service will scatter icons in whatever location you had your original in) and right click on it, scroll down to Services and select CreateXCodeIcons. Click Open.Ī prompt that looks like this will ask whether or not you want to install the CreateXCodeIcons service.Ĭlick Install, and now you will have a new menu item in your Finder called CreateXCodeIcons. The application is currently unsigned, so you will get a prompt requesting whether or not to open a file from an unknown developer. ![]() To get it, simply download CreateXCodeIcons.zip, unzip, and then right-click on the CreateXCodeIcons file. For now, we’ll just give you our Automator Service Workflow CreateXCodeIcons. We’ll save how to create Automator scripts (actually, I think they are called “workflows”) for a later date. Then its drag-and-drop into XCode and done.Įnter Automator, and better, enter Automator Services. This will allow us to take our source application icon (the one at 1024×1024 resolution), and generate all of the little icons we need. So, before we get to using Images.xcassets, let’s take a look at an Automator script that we can add to our Mac as a Service. I don’t know about you, but I get tired of resizing icons and all that. for an iOS 5, 6, or 7 Settings icon, supply a 29pt icon at 2x resolution (58×58)Īnd for any phone that has a target earlier than iOS 7 you have to supply 1x versions for the Spotlight and Launchpad icons, 29pt and 57pt, respectively.for an iOS 5 or 6 Spotlight icon, supply a 29pt icon at 2x resolution (58×58).for an iOS 7 Spotlight icon (the miniature icon that displays when you search for an application), supply a 40pt icon at 2x resolution (that is, 80×80).for an iOS 5 or 6 launchpad icon, supply a 57pt icon in 2x resolution (that is 114×114).for an iOS 7 launchpad icon, supply a 60pt icon in 2x resolution (that is 120×120).You can supply all of the following dimensions for your application icon: With iOS 7 and XCode 5 it gets even crazier. If you read up on Apple’s documentation you could supply on a single icon labeled that was 114×114 and the OS would display the image correctly regardless of the phone. So, you had to begin bundling a 114×114 (note that 114 is 57 times 2) icon with your application. Unfortunately on an iPhone 4 (retina display), the 57×57 PNG looked like, well, less than crisp. On a “non-retina” iPhone (such as the 3GS), you could get by with supplying a 57×57 PNG and be done with it. Suffice it to say, this year its 1024×1024.Īs the iPhone and iOS operating system have evolved over the years, so have the icon sizes required in your application bundle. Every other year Apple seems to be raising the resolution that the AppStore icon must be in. You will at least need it to create your application entry in iTunesConnect. If you don’t have a 1024×1024 PNG of your application icon, I suggest you go get one. ![]() you’ve at least heard of OS X Automator.you are using XCode 5 and are ready to explore the joys of Images.xcassets.you have an original 1024×1024 PNG file of your application icon.In this blog post I’ll look at how to take your application icon and create all the right files to import into your XCode project. But, we aren’t there yet so let’s look at the next best thing. Trouble-free in my opinion would be supplying one file (the original master) to XCode and letting it take care of the rest. ![]() Yet, I do have to deal with taking the artwork created for us and importing it into our iOS applications, and although it has gotten easier, Apple hasn’t yet made it trouble-free. coming out of LLC most certainly did not come from me. I will admit that I’m a terrible graphic artist. You might be interested in checking out our new post on quickly creating Apple Watch icons! The included automator script needs to be expanded to include icon dimensions for the latest lineup for iPhones, but you can easily do that with OS X Automator. Editors Note: This article was originally published on January 26, 2014.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |