XF.iOS the image set "imagesetname" has 8 unassigned children

Sjors Miltenburg 6 Reputation points
2021-03-02T10:04:15.353+00:00

I am building a Xamarin Forms app for ios, android and windows.

when adding a new image to ios project I was previously (an earlier version of Xamarin Forms or maybe an earlier version of Visual Studio) able to use Visual Studio Community for Mac on my mac-mini and

  • add a new image set
  • add a .png image only to the "universal - 1x" and it would compile and run just fine.

Now, (I don't know what changed exactly) when I do this I get a compile warning "The image set '[imagesetname]' has 8 unassigned children.

Apperently the content.json format changed. And visual studio only seems to auto-update this for new or changed imagesets.

Probably visual studio wants me to add another 8 images, but which ones i'm not sure.
I can't find what the "minimal" set is.

I wanted to do the minimal amount of work (resizing to all those resolutions is a bitch) so I saved my .png image to a .pdf with photoshop.
I read that the build will take care of generating the different image sizes.
Then i added the .pdf image to all the "vector" fields in the asset manager.
so "Universal - vector", " iphone - vector" ... etc

What is strange is that when I rebuild my ios solution it still keeps saying it has 8 unassigned children.

I also tried to check the "resizing" checkbox in the top.. no luck

Other things i tried:

  • fill all the image size slots with the same png -> still says 8 unassigned children
  • create a new asset catalog (.xcassets file) and add a new resource there => same situation
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,312 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cole Xia (Shanghai Wicresoft Co,.Ltd.) 6,751 Reputation points
    2021-03-03T02:31:53.43+00:00

    Hello,

    Welcome to Microsoft Q&A!

    The warning is caused because some image caches remains in assets ,check the following screen shot

    73546-ca444pture.png

    Possible solution

    • Delete the image group

    73611-captu2re.png

    • Create a new image group
    • Just set Device-Universal as true in properties menu. 73573-capture.png
    • Fill all the image size(1x,2x,3x) slots with the same png

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments