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.
Related
So I was snooping around in that achieve trying to make my app smaller. And I found something odd!
There are two identical copies of every image! One with an ending "~iPad" and one with "~iPad#2x"
I understand the purpose of having those two endings, but when I am setting up the .xcassets the way I am.... I don't expect the app to need it. Is there any way to get rid of the duplicate?
Here is how I have set up one of my entires:
You should use universal image asset instead of separate for iphone and ipad.
from assets select this image set and from attribute inspector uncheck iphone and ipad under Device and check universal from it.
So you will get universal imageset with 1x,2x and 3x will automatically used by iphone and ipad both.
If you are using different size of images for iphone and ipad then you must set separate images for iphone and ipad but if you are using same image size then you should use universal as i mentioned above.
Hope this will help :)
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 :)
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.
My app has unique interface for each iPhone model. More specifically, there is a unique interface for each screen size. While I could embed everything in a single app, there are many unused assets. For instance, full screen image for iPhone 4S requires 1.76 MB, but IPA requires 12.63 MB for the same asset because it contains a separate image for each possible screen size.
Is it possible to submit separate IPA's for each iPhone model, where each includes only assets required for that specific iPhone?
No you can't. The workflow Apple has built is to include all assets for every screen size. You use tools like autolayout to show and hide things based on screen size.
please change your project to support auto-loayout or handle view programmatically.
what you intended wont work.
You don't need to (or are able to), have multiple .ipa files for an app at one time. In fact, you've probably created more work for yourself then you actually needed to do by trying to do so.
Apple is now encouraging developers to embrace Adaptive User Interfaces. As their guide states, "With the latest advancements with View Controllers in iOS 8 and Auto Layout in Xcode, it’s now even easier for you to adapt your user interface to context and different sized devices". In other words, you only need a single storyboard for all iOS devices.
I would encourage you to do some more research on this concept, and adopt it for your app. This tutorial should get you started.
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