2

I'm building an app for iPhone devices ("devices" set to "iPhone" in "general" tab of mon only target). When run on an iPad simulator (or a real iPad) I do not have the correct icon (the one displayed correctly on an iphone).

Note that my AppIcon is defined in the Images.xcassets. See here screenshot of my assets.

Any ideas?

chepiok
  • 193
  • 12

1 Answers1

1

In that screenshot it looks like you only have iPhone icons loaded. Is your app set to both iPhone and iPad in the main settings? You may have to create a new project with "Devices" set to "Universal" for the iPad options to show up in the AppIcon file (see image below, how yours needs to look).

App Icons

If you don't want to create a whole new project, open your AppIcon file in the finder, erase everything, paste the code below in, save & then add all the iPhone & iPad images in again.

{
"images" : [
{
  "idiom" : "iphone",
  "size" : "20x20",
  "scale" : "2x"
},
{
  "idiom" : "iphone",
  "size" : "20x20",
  "scale" : "3x"
},
{
  "idiom" : "iphone",
  "size" : "29x29",
  "scale" : "2x"
},
{
  "idiom" : "iphone",
  "size" : "29x29",
  "scale" : "3x"
},
{
  "idiom" : "iphone",
  "size" : "40x40",
  "scale" : "2x"
},
{
  "idiom" : "iphone",
  "size" : "40x40",
  "scale" : "3x"
},
{
  "idiom" : "iphone",
  "size" : "60x60",
  "scale" : "2x"
},
{
  "idiom" : "iphone",
  "size" : "60x60",
  "scale" : "3x"
},
{
  "idiom" : "ipad",
  "size" : "20x20",
  "scale" : "1x"
},
{
  "idiom" : "ipad",
  "size" : "20x20",
  "scale" : "2x"
},
{
  "idiom" : "ipad",
  "size" : "29x29",
  "scale" : "1x"
},
{
  "idiom" : "ipad",
  "size" : "29x29",
  "scale" : "2x"
},
{
  "idiom" : "ipad",
  "size" : "40x40",
  "scale" : "1x"
},
{
  "idiom" : "ipad",
  "size" : "40x40",
  "scale" : "2x"
},
{
  "idiom" : "ipad",
  "size" : "76x76",
  "scale" : "1x"
},
{
  "idiom" : "ipad",
  "size" : "76x76",
  "scale" : "2x"
},
{
  "idiom" : "ipad",
  "size" : "83.5x83.5",
  "scale" : "2x"
}
],
"info" : {
  "version" : 1,
  "author" : "xcode"
}
}
Trev14
  • 3,626
  • 2
  • 31
  • 40
  • I've set my device to iphone and not universal. For that reason I assume that iPad stuff was not usefull. I don't want to be universal as the UI is not ready for this. On the iPad I jut want the x2 magnified version of the iPhone. – chepiok Feb 16 '17 at 23:15
  • Ok so the solution as to switch the device to universal and recreate a set if icon. now all the ipad variants are inside. remove the old set (and drag and drop all the proper icons) and rename the new one AppIcon. switch back the device to iphone. And "voila" when running on ipad, the icon is here. BTW still not understand how an icon not prepared like this have a correct icon (I mean when iPad was launched, still using old iphone app and with correct icon). Thx guys to force me to test this. – chepiok Feb 17 '17 at 06:55