'Assets Warning - The image set name xxx is used by multiple image sets

Just curious, apologize in advance if bothered.

Getting the warning When i using same name for multiple image sets. I already know using different names will solve the problem. But i am wandering what is the behavior of Xcode what if i don't do that by still keeping two image sets with the same name and run project. Which image set will be chosen ?

EDIT

Here is Relevant docs .



Solution 1:[1]

I found this question while looking for a way to fix the issue:

The image set name xxx is used by multiple image sets

I know my post does not answer the question asked here but I wanted to leave this response here just in case someone else happens to find this post as I did while searching for a solution.

I was moving images from one project to another when this warning appeared. It was apparently due to having 2x & 3x sizes with the same name.

However, I had the exact same images in another project named in exactly the same way without seeing this warning.

X-code had already appended the file names in the finder directory by adding “-1” and “-2” to the name when I moved the images into the Assets folder.

While back inside of x-Code I had all images in the Assets folder with the same name.

Looking here,

Target>Build Phases>Copy Bundle Resources

The way the folder appeared after I deleted the file

I found there were Two items being copied

"Assets.xcassets" and "Preview Assets.xcassets

I deleted the “Preview Assets.xcassets” and the problem was resolved.

I hope this helps someone.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jim Bray