XCode5 won't accept all my icons and launch images - ios

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

Related

Xamarin Image Assets for Size Classes

I am building an universal Xamarin application for iOS. I am working on the launch screen, and trying to use size classes to modify the layout for iPhone and iPad devices. The positioning works correctly, but when I try to set the image assets things go wrong.
I am trying to use the size class feature on the XCAssets file within Xcode to set the correct image I want for the different screen sizes. I have an image set for [any, any] ([,]) for the iPhone, and then I have one set for the [regular, regular] ([+, +]) for the iPad.
In Xcode's interface builder I can see the correct image in my launch xib file when switching between the [any, any] and [regular, regular] size classes. However, when I run this in my iPad simulator I do not see any images at all. Note that when I run the app in my iPhone simulator the [any, any] images are picked up correctly. It's only when running on my iPad simulator things go wrong.
I have resorted to using Xcode's tools as I cannot find a way within Xamarin to get images within a single image set for different size classes. I believe the issue I'm running into must be an issue within Xamarin not respecting the properties set in Xcode.
My question is has anyone been able to get this to work on Xamarin, and if so how?
Thanks!
Ok, so I found the solution. It appears to in fact be a bug within Xamarin and has todo with Xamarin not always updating the XIB files correctly.
Firstly, do not use the size class options inside of the XCAsset file within Xcode. Simply use the Xamarin version of the tool, and set the iPhone and iPad variations of the image set. I used the naming scheme [image_name][#2x|3x].[ext] for iPhone graphics and the scheme [image_name]~ipad[#2x|3x].[ext] for the iPad variants. However, keep in mind that according to the Apple documentation when you use size classes the ~ipad suffix is ignored. I simply use this suffix to make the file names unique between iPhone and iPad.
Second, go ahead and use size classes as you wish, but do not worry about changing the graphic name, and do not worry about the fact that you will not see an image preview when in the [regular, regular] class.
Third, before running the app use the Xamarin clean command at least once, but sometimes it takes a couple of attempts to fully clean the solution.
After theses steps the image assets worked for me for the iPad via [regular, regular] size class. I know it seems hacky, and may not be the "Xamarin" or "Apple" way of doing things, but it works.
Hope this helps someone else not spend two hours of their life dealing with Xamarin's short comings :)

Why doesn't default xcassets LaunchImage support iPhone5 out of the box?

I'm trying to set the splash screen on a react-native app that I intend to deploy for iOS devices.
As we all know, there are a few different screens to target (varying by pixel density, aspect ratio, and other things), so I've got to provide a handful of images. There appear to be at least three methods of providing the mapping that allows iOS to decide which image to use in any scenario; it's my understanding that any one of these approaches is supposed to be sufficient by itself:
Put all image files in the root of the Xcode project, naming them according to a specific convention (Default.png, Default#2x~ipad.png, Default-568h#2x.png, etc.)
Define a UILaunchImages dictionary item in the project's Info.plist, with a dictionary entry for each scenario that points to the desired image
Create an item of type "LaunchImage" in an asset catalog, drag-and-drop your images onto the placeholders for each scenario, and then point to the LaunchImage item in the project target's "App Icons and Launch Images" configuration
My strong preference is to use the third approach, in large part because it requires the least amount of technical precision as far as defining the identifying characteristics of each display scenario. But it's not working when I test on my iPhone5 -- the splash screen is black, instead of showing my colorful image. I've placed an image in every spot on the LaunchImage board, which suggests to me that the LaunchImage skeleton that ships with Xcode6 simply doesn't have a spot that corresponds to iPhone5. That can't be right. (Yes, my images are PNGs.)
A lot of tutorials tell me to create a new Image Set in the asset catalog (it has a different skeleton), but the "App Icons and Launch Images" configuration only permits me to choose items that are LaunchImages.
There are lots of resources online that document the first two approaches -- i.e. relying on the filesystem convention, or defining the mapping in the Info.plist -- but nothing that seems to really address the asset catalog approach.
Can someone point me in the right direction?
EDIT: Interestingly, when I put my #1x image in every spot on the LaunchImage board, the project fails to build because "there is no applicable content." When I put my #2x image in all the Retina spots, the app builds, but the splash screen is black.
Does this reveal something?
After a bit of experimenting, it turns out that the phone was silently rejecting the image that had been assigned to that scenario because the image dimensions weren't correct. The image I provided was very slightly larger than appropriate, and apparently the way iOS handles this is to show a black launch screen without emitting any kind of useful diagnostic information.
I got the exact dimensions from this SO post.

Binary Not Optimized for iPhone 5 - all icons included

So I was about to send my app in for review to be published on the app store, but I got this error:
I found some related StackOverflow answers that recommended that I add icon files in appropriate sizes, which I have done.
However, the build is still failing.
To add confusion to whatever is happening in this case, I have followed all instructions in the error message apple gives me and still it fails to upload:
I have set up UILaunchImages in my .plist file:
I have included an image Default-Portrait.png in the root level of my bundle:
So given that my launch screen and icons seem to be in order as far as the error messages describe, I am not sure what to do from here.
Any ideas what else could be going on here?
To clarify what was mentioned by #jrturton, the recommended way for iOS 8 is to create a Launch Screen, a Storyboard that you can design to adapt to various screen sizes with Auto Layout and size classes. This will be much easier than separate images for all past and future screen sizes.
Project > General:
You need default-portrait~568 as well. If you're using launch images you need one for 3.5 inch screens and one for 4 inch screens.
If you use an asset catalogue for your launch images you can see exactly what is required.
Better yet, use a .xib file which will scale automatically and give you proper support for all device sizes.

where did the icons/launch image table go in xcode 6?

If you look at this thread
iOS 7 App Icons, Launch images And Naming Convention While Keeping iOS 6 Icons
You see that xcode used to show a nice table where you could see all icon/launch image dimensions, what is missing etc.
I just managed to start migrating our app to ios8/iphone6 so i also upgraded xcode. However, now i can't seem to locate that table anymore, all there is is an empty section with buttons to "use asset catalog":
So, i have 2 questions:
is the table somewhere else, or is "asset catalog" the way to go now?
I tried the asset catalog, and all images are copied into this xcassets catalog. Is there any reason for me to keep the original files in the project? Do i need it for anything else, like ios5? I looked around but found no answer.
Thankful for some pointers.
Use the Asset catalog , this is the preferred way now.
If you use the asset catalog, all the images will be copied to images.xcassets, there is no need to keep the original files. If you control click the assets and show in finder, you could find the copied images. In asset catalog you have options to give different images for iOS 5,6,7 landscpae or portrait whatever is appropriate for your app.

iOS app Icon - how to?

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.

Resources