I am currently trying to push an app to the store (Build > Archive), but it keeps complaining about sizes of icons and certain sizes not actually existing.
I cannot find a slot in the Images.xcassets > App icon for a 120 or a 152, so first where do I put these icons so that it builds correctly.
Secondly, this is ridiculous, is there a photoshop script I can use that does the same icon up in 120, 152, and whatever other sizes it needs.
App script for photoshop
http://www.appsbynight.com/2012/09/17/create-every-ios-icon-for-your-app-with-a-photoshop-script/
Not used it, as I have a program on the Mac that converts it for me from a large image to smaller ones.. see below and is free...
https://itunes.apple.com/us/app/prepo/id476533227?mt=12
also the images to have #2x for the larger ons
so
icon-60.png
icon-60#2x.png (120 sized one)
This is not ridiculous.
2*60 = 120
2*76 = 152
Note that's said in "points" and not pixels. You have to check for the coefficient (x2 for Retina Display). Plus, since in iOS7 sizes changed, all iPhone/iPod Touch which can have iOS7 are Retina (that's why there is only the "x2" for iOS7 iPhone). For iPad, there is iPad Mini (non-retina).
I have modified an old photoshop script to create icons that have a size that matches the requirements in xcode 5.2
https://gist.github.com/derpest/8437300
Adding the correct icon to the correct place stops the errors upon validating to push to store.
A good explanation of this is explained here: 'Missing recommended icon file - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format'
If you want an automated way to make your icons at all the right sizes, check out the App Icon Template. It’s a Photoshop file and a companion action that let you design your icon once, then export it all at once. Be warned that you may want to tweak your icons at each individual size to get the best look, but this is a good starting point because it lets you quickly preview your icon at all sizes.
Related
I have developed the IOS app, and it is my first app ever. I have 2 real devices. Iphone 5 and Iphone 6 plus.
I have created a UITable and in that under the custom cell I am showing small images let say 20 * 20 to represent something followed by its text.
For example I am using location icon and then I write its location in string. and both are horizontally aligned in a cell.
when I run it on the emulator Iphone 8, it shows the icon and the
screen design is as expected. but when I run it on my both devices it
is not showing me icons there it is only showing location in text form
but location image is just not there in both devices.
So I know I am doing something wrong so my summed up questions are
What is the size should I select as image/icons like button icons ?
how to put images in the project? I know it is like drag and drop in assets file? but is not there a way ?
I am not getting on how to make image and then postfix it with #2x #3x and from which size I need to start and then How to do it ?
I followed a tutorial over youtube but that was for app icon, and my app icon are visible on each devices, and looks good. But I am really confused about other icons that I have to use inside the app. and about their sizes and about how to put them in project
Please help me, and discuss it with me instead of links of pages because I have read too much on it but still a dumb head. please help me
Here is how to add an image to your project:
In the Project Navigator, open the Assets.xcassets by double-clicking on it.
Control-click in the blank area below AppIcon and select New Image Set from the pop-up.
A new asset called Image will appear. Click on Image and give it the name you want to use, (for example "house").
Drag and drop 2x and 3x PNG images into the appropriate spots. If your image is 20 x 20 points on screen, then your 2x image should be 40 x 40, and your 3x image should be 60 x 60. It is up to you to make sure those images have the proper detail and are not just scaled up low resolution images. (See Xcode images explanation for more background on 1x, 2x and 3x images).
In your code, you can load the image with let image = UIImage(named: "house") and iOS will select the proper resolution image for your device. The iPhone 5 will use the 2x version, and the iPhone 6 Plus will use the 3x version.
I want to set a background image to my app but the image is not centered. The resolution is 640x1136, I have only one size, do I need more ? What is #2x and #3x ?
EDIT
I ended up spending ~ an hour in chat with the OP, and the solution to their problem was ultimately to remove all launch screen assets from the xc bundle and instead just put a UIImageView on the launch screen storyboard, anchor each side of it to the sides of the view, and set fill mode to aspect fill. That said, the below information is more likely to solve the problem for the majority of people who run into this, I think.
You need different sized images for the different screen sizes & aspect ratios. From the Apple docs:
It’s best to use an Xcode storyboard for your launch screen, but you can provide a set of static images if necessary. Create static images in different sizes for different devices, and be sure to include the status bar region.
The documentation includes a large table with all possible screen sizes one might support.
Many tutorials exist on the topic, and they may be a good place to start. This similar SO question also has a number of useful and informative answers.
Personally, I make one high-resolution image and then drop it into a tool which automatically generates all necessary screen sizes for me. I do the same thing for all the app icon sizes. Many such tools exist; SO is not an appropriate place to pontificate on which tools are better than others, so I will leave that choice (and research) up to you.
As far as where to put the images, the following instructions from Matthew Palmer's tutorial should be sufficient to get you started:
1 In Xcode, Click on your Assets file (Images.xcassets) in the left sidebar. It should open in the main pane.
2 In the left sidebar of the main pane (where AppIcon, LaunchImage, etc. are), right click
3 Select New Launch Image
4 Add your new launch images as normal. If you want something quick and easy to use, Paul Haddad recommends taking a screenshot in the iPhone 6 simulator and using that, or DavidSmith has created some default ones.
5 Change the Launch Images Source from your Target’s settings.
I found a useful list of launch screen resolution sizes here, which I will quote below:
Image Resolution Image name
320x480 Default.png
640x960 Default#2x.png
640x1136 Default-568h#2x.png
750x1334 Default-667h#2x.png
1242x2208 Default-736h#3x.png
768x1024 Default-Portrait.png
1024x768 Default-Landscape.png
1536x2048 Default-Portrait#2x.png
2048x1536 Default-Landscape#2x.png
The link where the above table was quoted from is also probably the best tutorial I was able to find on the topic. Note that, if you make the larger sizes first and drag them into Xcode, Xcode and auto-generate many of the smaller resolutions for you. (For example, providing one iPad resolution will typically be sufficient for all iPad resolutions.)
Ok let's take this one question at a time...
Background Image not being centered, I assume you have an ImageView containing that image... If so you should be able to do something like imageView.contentMode = .center
The #2x and #3x are for the newer phones with higher resolution. It is advised to have all 3. Also if you could show any code that would help.
Per default Apple only seems to allow #3x, #2x and #1x as suffixes for images and app thinning.
#3x resources seem to be reserved for iPhone 6/7 Plus, even though their screen resolution is smaller than the resolution of the largest iPad Pro - which seems to use #2x.
Is there any way to specifically have 5 different folders with data and use one folder per actual device resolution that is out there? Those folders would be for example (and any new or in-between resolution would use the closest folder and scale):
568p
1136p
1334p
2048p
2732p
Is that possible somehow?
In the Assets in your Xcode project you can click on the + and add a new image set. There you can right click and add iPhone and iPad individually.
I am using Universal for Assets.xcassets in the hopes that I only have to create 3 different sizes for each image I use. But, despite Assets.xcassets telling me that my images are Universal in the Attributes Inspector, when I test on my iPad, the images are blurry and aren't as sharp as they are on my iPhone, making me question why there is a Universal option.
I've double checked all my images and they are all correctly sized.
My questions:
In the Attributes Inspector, under Universal, there are iPhone and iPad options. In order for my iPad to provide crystal clear images, should I use the iPad option?
And if I should: What's the point of the Universal option if it doesn't really do its job?
Also if I should: What size images do I use. The iPad option gives me the options of 1x and 2x size images. So, should the size of the 1x image for iPad be the same size as 1x image for Universal?
Thanks in advance.
Universal merely means that this app will run on iPad and iPhone natively. Thus the devices on which your app might run can have a single-resolution, double-resolution, or triple-resolution screen.
If you have checked Universal, accordingly, you should see three slots:
Your job, therefore, is to make three versions of your image, sized in proportion. If the 1x is 100x100, the 2x should be 200x200 and the 3x should be 300x300. The version in the appropriate slot will be used at runtime in accordance with the screen resolution of the device we're running on.
The asset catalog does not do any image sizing for you. You have to do it beforehand. (I find Graphic Converter a nice utility for this purpose.)
You could just supply a 3x image and allow the runtime to size down for you, but this is a waste of memory; Apple specifically advises against this in one of the WWDC 2016 videos. So just bite the bullet and make all three image sizes yourself.
Finally:
when I test on my iPad, the images are blurry and aren't as sharp as they are on my iPhone
Hmm, the only reason I can think of for this is that your app is not running natively on the iPad, but is an iPhone app running in "emulation mode" on the iPad. If that's the case, nothing you can do is going to make it look really good. It would be better to write your app as a true Universal app. That is a setting that you make when you create the project initially (though it can be changed later by editing the app target).
Apple now require that a 1024x1024 icon is submitted for the App store. Where can I see an example of where this icon is used? The largest icon I can find in the iTunes store is about 180x180 - even on a retina screen, 360x360 would be sufficient.
I am putting some time into designing a large version of my icon, but if it is going to then be shrunk down, I need to design for this, no?
The large version of the icon is used to generate smaller versions for display in the app store and in other places that require icons in sizes other than the ones you submit. That way, if they need a version of your icon that's 162 px square, or 204 px square, or whatever, they have plenty of pixels in the larger version to ensure a reasonable rendition at smaller size.
Apple used to require a 512 x 512 px icon for this purpose -- sounds like they've doubled the resolution to support retina displays.
Remember, we're talking about a megapixel image here, not a 32 x 32 px tiny icon. When you're dealing with teensy icons, you do have to hand tweak each pixel to get the best approximation of the image you're trying to represent. When you're talking about scaling from 1024 px square to 360 px square, there shouldn't be a problem unless you've added some very fine detail at the large size. Don't do that.
You can find all the 1024x1024 png files in the source of the app's preview page.
Here's the trick:
Go to the app's page: https://itunes.apple.com/us/app/facebook-messenger/id454638411?mt=8
View Page Source (CTRL + U)
Find the "property="og:image" part. (CTRL + F)
<meta content="http://a4.mzstatic.com/us/r30/Purple/v4/c0/92/69/c09269c0-85ca-fd85-5f0f-f235dff13ff8/mzl.lyucgsnh.png" property="og:image" /
Copy the png's url, and paste in to the browser:
http://a4.mzstatic.com/us/r30/Purple/v4/c0/92/69/c09269c0-85ca-fd85-5f0f-f235dff13ff8/mzl.lyucgsnh.png
Voila! :)
From apple:
Starting in July, newly submitted iOS apps require high-resolution
icons and cover art. Large icons and Newsstand cover art must have a
minimum resolution of 1024 x 1024 pixels. To change your app icons or
cover art, go to the Manage Your Applications module on iTunes
Connect. For more information, see the Custom Icon and Image Creation
Guidelines in the iOS Developer Library.
As the largest right now would be the iPad 3 retina, the icon would be used for the AppStore large icon, which used to be 512 x 512, so double that for retina.
The 1024x1024 icons are for the app store according to tho iOS Human Interface Guidelines.. The table states that it is the:
App icon for the App Store
I guess it is for retina and promotion purposes. So Apple can make the large banners in the store and smaller icons out of it.