12

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.

karpat
  • 571
  • 4
  • 7
  • 1
    Look for a file called `Assets.xcassets` in your xcode project and click on `App Icon` and make sure all of the required image fields have an assignment image – BigSpicyPotato Oct 15 '17 at 19:56
  • yes I've checked that and all the iPad icons were there. no missing – karpat Oct 16 '17 at 18:18
  • you don't require ipad icon if app is only for iphone. – Pawriwes Dec 01 '17 at 01:43
  • may be the stackoverflow link is useful for the problem.https://stackoverflow.com/questions/30437560/my-ios-app-is-not-showing-app-icon-in-simulator/46349476#46349476 – sixsixsix Aug 11 '18 at 13:28

4 Answers4

45

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.

karpat
  • 571
  • 4
  • 7
3

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:

Before

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:

After

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..)

Mike Gledhill
  • 27,846
  • 7
  • 149
  • 159
  • Yup. all this happened probably because you started the project with iPhone only as the targeted device (thus when initially creating the image set, it only offers you the iPhone ones). at some point you probably changed it to "Universal" where from now on, every new image set will show you all images that needs to be added. – oriharel Jan 23 '18 at 20:47
1

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.

Attribute Inspector

FromTheStix
  • 429
  • 5
  • 10
  • I was failing the app validation for submitting to App Store because I didn't have iPad icons. I looked everywhere in Xcode and couldn't find how to add them. Your answer was the solution! Extremely unintuitive, as always with Apple. Thank you – qwertzguy Jan 09 '19 at 23:48
  • Awesome! Glad it helped. I've found it's sometimes the obvious things that elude us and I appreciate it when I find little reminders, like this, out there on SO ;) – FromTheStix Jan 10 '19 at 20:04
0

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.

enter image description here

I just changed device type by right cling on image set to Universal :

enter image description here

This did work for me.