34

I'm getting these errors:

enter image description here

I can't tell exactly which thing it is talking about?

enter image description here

If it is a 42 mm 2x, then I don't have a spot to put that. Can you help? Thanks!

enter image description here

EDIT: Per comment below, I looked on the right pane. Looks like it needs the 44 2x...

enter image description here

enter image description here

...so I have one created, but the Unassigned doesn't highlight when I drag the icon over it, so how do I assign it in my image assets?

enter image description here

EDIT again: Right click show in finder? enter image description here

SRMR
  • 3,064
  • 6
  • 31
  • 59
  • Please look into this: http://stackoverflow.com/questions/18780476/ios-7-app-icons-launch-images-and-naming-convention-while-keeping-ios-6-icons/22353990#22353990 – msmq Apr 03 '15 at 14:19
  • @msmq thanks for the response, please see my edit, because I can't drag the needed icon into the `Unassigned` image part for some reason. And I believe I have the correct image size and everything? – SRMR Apr 03 '15 at 14:26
  • Try by right click and select Show in Finder option and just add that icon there; Hopefully, it will be fixed. – msmq Apr 03 '15 at 14:46
  • I added an image above, I'm not sure how I'd click Show in Finder because its grayed out? – SRMR Apr 03 '15 at 14:48
  • Just try this with some other icon; because, location will be same for all the icons. – msmq Apr 03 '15 at 14:50
  • If its asking for a 44 2x icon (which maybe it isn't) I already have it in that folder? – SRMR Apr 03 '15 at 15:56
  • you need to add 88x88 icon in that folder. – msmq Apr 06 '15 at 07:17

7 Answers7

69

I had the same issue! The solution that worked for me was pretty easy:

Just select the unassigned image and delete it via delete button. Clean and Build. Done.

Hope this helps!

esvau
  • 744
  • 5
  • 8
4

(That's assuming you didn't miss any of the required images)

I had this problem a while ago: I went into the media.xcassets directory and checked the contents.json file, where I found some entry with "unassigned" set to TRUE. I removed it and it removed the compiler warning.

Hope you got stuck in that same scenario so you will also be able to fix it.

Darkseal
  • 9,205
  • 8
  • 78
  • 111
  • I do see that in my `contents.json` file, when you say "I removed it" what do you mean by that, like remove the image in Xcode or edit that json file or something else? Thanks! – SRMR Apr 03 '15 at 14:29
  • I had something like { "idiom" : "universal", "unassigned" : true } which I removed from the contents.json file. – Darkseal Apr 03 '15 at 14:30
  • I have: ` { "size" : "44x44", "idiom" : "watch", "scale" : "2x", "unassigned" : true, "role" : "appLauncher", "subtype" : "42mm" }` – SRMR Apr 03 '15 at 14:31
  • But if I remove that, is it removing something important I need because it has to do with some sort of `appLauncher` icon that will need to be there? – SRMR Apr 03 '15 at 14:31
  • Nothing "needed", as 44x44@2x are flagged as optional in the official docs: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html But I understand it could be better for you to look for a less of a workaround solution before resolving to this one. In my scenario it had something to do with a Car App/Car UI icon (also optional), so I was glad to remove that since I didn't need to support anything like that. – Darkseal Apr 03 '15 at 14:33
  • These are in the WatchKit part, does the doc speak to those too? – SRMR Apr 03 '15 at 14:35
  • I'm assuming deleting the `Unassigned` with the delete button would be the same thing as editing the json file right? – SRMR Apr 03 '15 at 14:35
  • It couldn't be done from the GUI at that time: I guess now we can. – Darkseal Apr 03 '15 at 14:36
  • I guess I'm just wondering why I need the 38mm 40 app launcher but wouldn't need the 42mm 44 app launcher, it makes sense that I'd need both right? – SRMR Apr 03 '15 at 14:37
  • ` { "size" : "40x40", "idiom" : "watch", "scale" : "2x", "filename" : "Icon-40@2x.png", "role" : "appLauncher", "subtype" : "38mm" },` – SRMR Apr 03 '15 at 14:37
  • Did you try to "manually" route the json to an image file with the right characteristics? I would try that and see what happens, maybe it's a GUI bug you've hit. – Darkseal Apr 03 '15 at 14:38
  • Yeah that makes sense too I'll try that! – SRMR Apr 03 '15 at 14:40
2

I had to

  • right click on one of the images in the lower row (with "unassigned" written under the row)
  • select "Universal" to unselect it
  • right click and
  • "Universal" again to select it
    • This changed the top row to show 3 empty boxes that were empty
  • Drag each of the images from the unassigned row to the universal row

Though, I don't know why those menu options are disabled in the original question...

Nate
  • 12,963
  • 4
  • 59
  • 80
1

Remove all "unassigned" photos from the asset catalog. It shouldn't appear there (click "Remove Selected Items" on your screenshot).

Idan
  • 9,880
  • 10
  • 47
  • 76
1

I had old icon files (no longer needed) in the folder where contents.json is located. I removed those files in Finder and the issue was solved.

TreeAndLeaf
  • 1,064
  • 1
  • 13
  • 15
0

My case is: My Macbook is running out of memory, so every time I restart the computer. I don't understand how the icloud driver erased or replaced all the data in the Contents.json file in the folder:

Runner> Assets.xcassets> AppIcon.appiconset (I dev with Flutter).

So the solution for my case is I have to bring the Contents.json file back from the back up and it works normally.

Doan Bui
  • 3,572
  • 25
  • 36
0

In my case I accidentally removed some assets and then returned them by means of git (just reverted deleted files from Xcode's Source Control tool) – the image files came back, but the asset didn't work and I had the same warning.

I opened the Contents.json file in the asset directory and saw that the images array was empty. I added my images there manually. For example:

{
  "images" : [
      {
        "idiom" : "universal",
        "filename" : "Icon.png",
        "scale" : "1x"
      },
      {
        "idiom" : "universal",
        "filename" : "Icon@2x.png",
        "scale" : "2x"
      },
      {
        "idiom" : "universal",
        "filename" : "Icon@3x.png",
        "scale" : "3x"
      }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  }
}
lazarevzubov
  • 1,767
  • 2
  • 14
  • 24