Backbase/variants

`variants.xcconfig` items should be sorted alphabetically

thanhtanh opened this issue · 1 comments

Background

With the current version, every time we run the variants switch command, the items in the variants.xcconfig file have changed the order randomly, even if nothing has changed. Or if we change just one item, but when we check the changes in git, it shows many other places, so it's hard to track what are changed.

Solution

The getDefaultValues method in the iOSVariant struct is returning a dictionary [String: String], so as the nature of the dictionary, the order of the items will be random. I think we can try to sort this dictionary by key before writing to the xcconfig file.

@thanhtanh is this something you can pick up yourself?