XCode: XCAssets Treats Folder As Image Name

Originator:DaNmarner
Number:rdar://23667324 Date Originated:25-Nov-2015 05:15 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7
Classification:Other Bug Reproducible:Always
 
Summary:

In Xcode 7, a image in .xcassets is stored as a text file in JSON format and a bunch of actual multimedia files in a folder. The asset name as recognized by Xcode is the name of the containing folder.

This design has a serious flaw! Namely, a letter case change in the asset/folder name is **invisible** to version control systems such as git, while all the references in storyboards, source codes, are visible.

In the attached sample project, an image named “icon-close-thin” is added to the one and only view controller in storyboard. Then the folder that contains the asset is renamed (i -> I). git will not acknowledge this change, therefore the icon is now missing in production. When this happens in real projects who have hundreds of images, there’s virtually no way to catch it other than visually exam the running app.

This has happened several times to beta builds of an app I work on. (the reason for the folder name change is unknown, but it happened during collaboration among several team members, but that’s beside the point).

Expected Results:

The asset name should persist in a version-control-friendly way, aka something other than the folder name.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!