Post

Replies

Boosts

Views

Activity

Xcode adding strange locale to images in xcassets
When I drag png files into xcassets, they display correctly in Xcode but can no longer be loaded by UIImage(named:). This appears to be caused by a new line in the Contents.json file describing "locale." { "filename" : "sidebar-album.png", "idiom" : "universal", "locale" : "Programming", "scale" : "1x" }, Removing that line allows loading the images to load. This is the first time I've added images since upgrading to Xcode 12, so I assume this is related. The "Programming" locale seems to be coming from the name of the root folder. The source of the images is a folder in ~/[ Programming ]/folder1/folder2/folder3/images. If I move the source to another folder it takes the name of that folder instead. Is there a way to shut this off?
3
0
1.4k
Oct ’20