Ensure the asset catalog parser ignores types we don't support (for now)#7
Conversation
| appIconSet, dataSet, gameCenterDashboardImage, gameCenterLeaderboard, | ||
| gameCenterLeaderboardSet, iconSet, imageSet, imageStack, launchImage, | ||
| spriteAtlas, stickerPack | ||
| ] |
There was a problem hiding this comment.
Wouldn't it be more readable to do a whitelist rather than a blacklist?
- If someone wants to make a PR to support an additional type, if would be more logical to me to let them add a type rather than remove one from that list
- If a new type comes with the next version of iOS and Xcode, wth a whitelist we won't have to ad that new type to the list until we support it
| spriteAtlas, stickerPack | ||
| ] | ||
|
|
||
| static let supported = [imageSet] |
There was a problem hiding this comment.
Maybe just add a comment here to tell that this is the list of folder extensions in the xcassets folder that we know how to parse, so that in the future when people will want to add PRs to support more data type (I know I have a coworker wishing to add SpriteKit support soon for example) they won't forget to add them here.
Now that the whitelist is only one item (compared to the blacklist listing a lot of extensions) any contributor won't have a lot of examples to get inspiration from like we had with the blacklist version, so better documentation would help instead.
AliSoftware
left a comment
There was a problem hiding this comment.
Once the comment is added, feel free to merge 😉
Needed for SwiftGen/SwiftGenKit#7 unit tests
Fixes #6.
We should consider eventually supporting the other types. For example: use
setAlternateIconName(_:completionHandler:)for app icon sets.