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 .
According to Apple Asset Catalog Format Reference docs:
For any target in an Xcode project, the fully qualified name of an asset must be unique across all the asset catalogs and across all asset types. For example, it is an error to have an image set folder in one asset catalog called Llama.imageset and an image set with the same name in the same catalog or in a different catalog that is part of the same target. Similarly, it is an error to have both an image set folder called Llama.imageset and an app icon folder called Llama.appiconset in the same catalog or in a different catalog that is part of the same target.
I found this question while looking for a way to fix the issue:
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,
"Assets.xcassets" and "Preview Assets.xcassets”
I deleted the “Preview Assets.xcassets” and the problem was resolved.
I hope this helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With