Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The app icon set "AppIcon" has an unassigned child

Tags:

xcode

ios

xcode7

I clean built my app and see this error message: The app icon set "AppIcon" has an unassigned child.

When I view Images.xcassets every icon slot is filled with the correct icon and there are no unassigned icons. In the past XCode seemed to randomly forget the slot for an icon and put it underneath all the labeled icon slots. On those occasions I dragged the icon back to the correct slot and the error went away. There are also no errors about any Icons being the wrong size.

I checked Images.xcassets/AppIcon.appiconset/Contents.json and there are no entries in the JSON that have a blank filename.

I'm using XCode 7.2.

I would appreciate any help.

like image 499
John Cashew Avatar asked Feb 10 '16 16:02

John Cashew


3 Answers

Select the unassigned image and delete it via delete button. Clean and Build.

like image 159
Yao Li Avatar answered Nov 09 '22 08:11

Yao Li


Ran into this same error but solved it in a different way.

In the project navigate to Assets.xcassets/AppIcon.appiconset/Contents.json and open this JSON file.

Review and remove any unnecessary set of icons.

For me, it was a group of iPad icons (seeing that the application was only iPhone compatible, it was not needed).

Once removed, Clean - then - Build

like image 40
Jeacovy Gayle Avatar answered Nov 09 '22 08:11

Jeacovy Gayle


And another cause for this error: difference in filename case on disk and in Content.json. They need to match.

In my case, the filenames on-disk were all lower-case and that's how they were referenced in Content.json. Then I got new images, they were uppercased, and I just dragged them into Xcode to update them. Now on-disk and Content.json were both referring to the files uppercased.

But Git didn't pick that change in case up, it just thought the files were updated and did not change the case. So on the build server, I ended up with lower-cased filenames, but Content.json was referring to them upper-cased. Needed to lower-case them on my system and fix the Content.json.

like image 2
DarkDust Avatar answered Nov 09 '22 08:11

DarkDust