App icon not showing up on iPhone 5 device during testing - iphone

I have a 120x120 icon image that's working fine on emulators - however when I try it on my device, the icon doesn't show up. Any thoughts?

I figured it out. This was actually really annoying. So the UI designer had simply renamed his .psd files with .png and xcode thought this was fine. However, renaming the .pngs isn't going to automatically make them real .pngs. The way I solved this was going to mac preview and exporting the files to the PNG format.

Sometimes some of the images get cached by the OS.
Delete your app completely from your mobile device (press and hold, then delete the app)
Turn off your device and turn it on again.(This ensures that the cache gets cleared)
In xCode, clean the project and rebuild.
Load the software again you your device.
You should be able to see your icon as long as its properly added to your project.

Drag your app over another app to group both into a folder. Then drag the app out of the folder.

Check your info.plist file. Make sure the icon entry looks something like this (use your own image file names of course):
If you see another "Icon already includes gloss effects" row outside, remove it.

It is not uncommon not to see your app icon on the device. However, when your app is being uploaded to the App Store, everything will be fine.
Is your iOS device running iOS7? If not, you will need to include 57x57 and 114x114 icons as well. See https://stackoverflow.com/a/18737063/1646862 for icon sizes apple requires. It is always good to include all icon sizes you may need in your iOS bundle.

Related

ios11 iphone app icon is missing on iPad

I have an iPhone only app but it works in compatibility mode in the iPad too(no surprises).
but after I updated the app for the ios11, app icon on the iPad is missing.
here is what I've tried;
- launch on the iPhone simulator, icon appears
- launch on the iPad simulator, icon is missing
change the device options from "iphone" to "universal", run the iPad simulator, icon appears but app needs a new iPad ui.
change back to "iPhone" and the app icon is missing again in iPad. really confusing.
I tried to create a new project and make the same changes but never able to make the icon missing again.
I'm using cocoa pods if that makes any sense.
I think I'm missing a settings or something else, I'm really trying to find it, any advice would be greatly appreciated.
I've found the problem.
In info.plist, there was an extra or problematic entry.
- CFBundleIcons~ipad
Remove this line and iPad icons appear normally.
This problem has been reported by many users over the past 6 months (including desperate pleas to Apple to fix this bug), yet no one's reported the following solution.
I'm using Xcode 9.2, and I noticed today that my iPad/iPhone's application will run fine on my iPad (iOS v11.2.1) but the icon is missing.
This is a legacy app, about 2-3 years old, and the cause seems to be my Appicon file. When I view this file, I see this:
Previously, this resource was sufficient to provide the app icon for both the iPad and iPhone, but apparently, not anymore.
I went into my Images.xcassets file, right-clicked, and selected "App Icons & Launch Images\New IOS App Icon" and now have a look at the extra icon possibilities:
Notice the extra icons for iPads.
Sure enough, I created yet more .png files, with resolutions matching the desired iPad resolutions settings, and now, when I build my app and run it on the iPad, it does show the correct icon.
Oh, and I also needed to go into my project's build settings, select the "General" tab, and change the "App Icons Source" to the name of my new image set, "AppIconNew".
Et voila. No messing around with Cocoapods, no need to change the .plist file (mine didn't have that "CFBundleIcons~ipad" entry anyway), I just needed to create a new image set.
Okay, time to go back to my modern, cosy world of using Visual Studio again now.
(Happy sigh..)
I've had a few legacy apps that did have the CFBundleIcons~ipad in the Info.plist, so I check that first. However, I've also had instances where it was just missing the asset as #Mike Gledhill mentioned. If this is the case, you don't have to go through adding a new AppIcon set. Just check the iPad box in the Attributes Inspector for the current AppIcon assets and the iPad sizes will show in the current set. Then just add the correct assets for each size requirement.
I didn't have CFBundleIcons~ipad entry in my Info.plist file as per "karpat"s answer. So I moved to "Mike Gledhill"s answer, then after observing my all the icons from Image assests, I found that for particular icon which was invisible only on iPad, the device type set was iPhone.
I just changed device type by right cling on image set to Universal :
This did work for me.

iOS Launch Screen Asset Catalog not working

I believe I am making a silly mistake. But I cannot figure it out.
I have an image named Default.png that I have added to my project. Now when I go to General and then Launch Images I drag and drop this Default.png to the 2x window for my app. When I go to build the project and try it, I get this error:
"The launch image set named "LaunchImage" did not have any applicable content."
What's the problem here? I've also seen that simply dragging and dropping the Default.png should do it, but I think that's for older versions.
Any ideas?
Thanks
Search for LaunchImage keyword in your .plist file and delete it. Then, try assigning the image again by dragging as you already did before...
This case raised in Xcode 5.0 + iOS 7.
Apple use Images.xcassets to group App Icons, App Launch (Default) Images in Xcode 5.0 + iOS 7.
For solving the problem of Asset Catalog Compiler Error
The launch image set named "LaunchImage" did not have any applicable content.
Approach:
Putting suitable size of images into LaunchImage.
For example:
Should be 640x960 dimensioning in iPhone Portrait iOS7 2x.
Should be 640x1136 dimensioning in iPhone Portrait iOS 7 R2.
Reference from iOS App Programming Guide:
Create and Set iOS Launch Images
Launch images are displayed while your app is launching on iOS. A launch image matching the device resolution appears as soon as the user taps your app icon.
App Launch (Default) Images
Specify the launch images for your app in your Xcode project settings. In Xcode 5.0, specify these images on the General tab of your project settings; in older versions of Xcode, this tab may have a different name. Xcode places your launch image files at the top-level of the app bundle and configures other project settings as appropriate. Specifically, Xcode adds the UILaunchImages key to your app’s Info.plist file automatically if your app runs on iOS 7 or later. That key tells the system the name of your app’s launch image files. For earlier versions of iOS, the system uses the launch image filenames to decide which image to load.
The same error has been resolved by adding the exact sizes of launch images for different iOS devices.
I tried everything here, deleted the .app and rebuilt each time, and nothing worked. I finally got fed up and switched back to the old style of launcher image specification (Project Settings Window -> General -> Launch Images -> Source -> Don't use asset catalogs.) That worked!
I had this problem as well. Make sure of a couple of things:
Aspect Ratio is what Apple expects, in other words square
The sizes are correct, 60pt (for example) should be 60x60
60pt #2x should be 120x120
After I fixed the sizes the app compiled without errors but I think the most important thing is the aspect ratio.
In my case, with Xcode 7, the Images.xcassets was missing from the Build Phases, under Copy Bundle Resources. Then I just added it manually and the problem was gone.
Try looking at the code for "LaunchImage" and rename it to "Default"
Check and compare carefully if your image size matches the expected size. In my case I was using a wrong size, but when correcting the project built fine.
Check this attached image to see where you can compare them

How do I get rid of sticky iPad splash screens?

Initially I developed my app as Universal. Then I designed splash screens separately for iPad. Recently I decided to deploy my app in iPhone device mode only. My app has no fancy graphics and it just looks well and works perfect on iPad either in 1x or 2x mode.
To do so I set Devices to iPhone at TARGET/Summary/IOS Application Target pane. I dragged new splash images I created for iPhone into Launch images placeholders, one for non-Retina and one for Retina displays.
However when I launch my iPhone app on the iPad, either through debugger or stand alone, the old iPad splash screens I no longer use come up. They look bad because the image centre appears to be moved down-right as they were originally created for iPad.
I went back to XCode and momentarily changed the Device type to Universal or iPad. I deleted the images both from Launch images placeholders and physically from the file system.
Unfortunately the iPad splash images I created earlier still come back when I build my app in iPhone device mode and deploy it on my iPad. How can I get rid of them once and for all and get the app use the iPhone launch images I created and setup recently?
If you deleted the images from the disk, Clean all targets (in Xcode Product->Clean) and rebuild. There should be no way after doing this that the old image will appear (if it does it means it was not deleted properly from your project).
Clean your project (Command+Shift+Option+K)
Close Xcode, go to ~/yourCurrentUser/.Library/Developer/Xcode/DerivedData
Find the folder for your project, and delete it.
Delete the app in your simulator or test device.
Now build and run the app, and that must work; if not, delete the final images once more, and repeat the above steps.
Don't forget to check your info.plist file for Icon Files key. Sometiems splash screen images get added to the Icon Files key for no clear reason! You must remove them from there.

Settings slider images on iPad?

I've got a settings bundle in my app, with PSSliderSpecifiers in it.
What sizes should those images on either side of the slider be for iPad?
(I know that for the iPhone, they should be 21 pixels squared, but they are not showing up on the iPad.)
Edit: in developer preview of 4.2, my images are back! No mod needed. Weird!
The image size does not really matter but I took the habit of putting the pictures directly into the bundle instead of counting on Xcode to do the job.
Try opening the settings.bundle using the "Show Package Content" finder command, drag your pictures in there and try again. Don't forget to "clean all target" after modifying the bundle.
The solution works for both iPad & iPhone
It is actually possible to have different settings for iPhone and iPad. This is done by specifying SupportedUserInterfaceIdioms in the PSSliderSpecifier item. So if you are seeing different behavior on the different device types, try checking whether this is the reason.
Pretty sure they should be the same for the iPad. Are you sure you correctly added them to your project?

iPhone Splash: "Default.png" displays on simulator but not the iPhone

I'm trying to give my iPhone a splash screen.
I've placed Default.png in my resources group. When I run the simulator it is displayed as expected, however when I install my application to the iPhone, no splash screen is displayed.
Does anyone know what the cause/solution to this problem is?
Thanks!
If Default.png is not showing up in device, but simulator... then try the following.
Be sure you delete any "default.png", "Default.png", "Default.PNG", etc. that you might have created in several wrong attemps from within XCode and in Finder.
Delete the App on your iPhone/iPod/iPad
In Xcode Build->Clean All Targets
In Finder go to your project and locate the build folder, delete all folders in there.
Create a new Default.png like in the following example:
Connect iPhone/iPod to Mac.
Start your App on iPhone
In XCode launch Organizer (Window->Organizer)
Select your connected Device
You should see a tab "Screenshots"
Push the Capture Button, to make a Screenshot of your App
Push "As Default Image..." Button (This will create the Default.png and add it to your project, so that's a really handy thing)
Build and Run again. It should work now
Problems can occur due to wrong format (should be 320 width and 480 height (yes, that means you can see the status bar in your default.png)) or because you might have named the first file default.png (WHICH IS WRONG), which worked in simulator because it seems to be case insensitive but then when it gets copied to iPhone, it won't be found, cause it is case sensitive. So it will still be there in build folder (i think) causing a next correctly named Default.png not to override the old default.png in this iPhone build folder and so it might seem, that you can't fix the problem (cause you see Default.png in project, but in build it's still default.png).
At least this is my understanding now (afterwards), since for me it simply didn't want to work even though I tried again and again with different solutions from other people.
So from my point of view this different file handling (case/not case sensitive) is a mess that you can solve, by simply cleaning all and everything and trying to generate a new Default.png with the organizer (after everything was cleaned).
If you want a different/modified splash screen. Open the generated Default.png with photoshop/gimp/whatever and edit it.
Make sure your image is 480x320 pixels, and placed in your application at the top level. The frameworks will display this image until your initial view has loaded and is ready for display.
If you are seeing a black background then there is something amiss, however if you are just seeing your app's initial view then be happy you have managed to launch your app and have it ready for use in good time.
If you really, really want the user to to see your splash screen then slow down your launch by adding a delay into your app before you present the initial view
The file name must be Default.png (with a capital D). Also, do a clean/rebuild of the entire project to ensure the most recent version of the file is being included in the project. Check the filename on the filesystem, it may display differently in XCode.
Make sure that is is added into the bundle. To do this, select the image in the XCode left navigation panel, get info on the file, and make sure the checkbox for your target is enabled. Also make sure the file is really a png and not just named that way.
Just check the spelling ... I think u r using "default.png" instead of "Default.png". just make "d" capital "D" of Default.png .
Another possible issue that is Default.png is actually Default.jpg that was renamed to .png.
This will work fine on the simulator, but won't work on the device.
If you are using an iphone 4 you also need to add a
Default#2x.png with the size 640*960 px.
That's what fixed it for me.
This naming convention applies to all images in your app btw.
I had a similar problem, but my images were being displayed as gray or gray bars. It turned out that there was an alpha channel on the PNG images that the simulator was having no problem with, but the iphone wouldn't display. I opened the images in preview on my Mac and re-saved them without the alpha channel and everything worked. Don't know if this is your problem, but it might be worth a try.
I know this is old, but I'm having the exact same issue. The image doesn't show on the device, but is fine on the simulator. I noticed a lot of really weird things with my project, like there were 3-4 "Default.png" images in my plist and that there were a few other "Default.png" images in different libraries and stuff that I didn't notice.
I tried everything to get them to show up, but after creating a new project and setting the launch images to the EXACT same images I was trying to use, they worked fine. The only thing I can think is that somewhere the project gets corrupted and won't figure out what those launch images do.
Had the same problem caused by saving the initial file as default.png, so it should be Default.png (normal) and Default#2x.png (retina) images.
Go to your projects plist and add a row "Launch image" - use a different file name. Save your images with this name (and add #2x.png for retina). Should be fine afterwards.
Also, if you've already install the app on device, delete the app from device (as previous installation may not affect the changes).