Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variants.xcconfig items should be sorted alphabetically #219

Closed
thanhtanh opened this issue Apr 7, 2023 · 1 comment · Fixed by #220
Closed

variants.xcconfig items should be sorted alphabetically #219

thanhtanh opened this issue Apr 7, 2023 · 1 comment · Fixed by #220
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@thanhtanh
Copy link

thanhtanh commented Apr 7, 2023

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 thanhtanh added the enhancement New feature or request label Apr 7, 2023
@arthurpalves
Copy link
Collaborator

@thanhtanh is this something you can pick up yourself?

@arthurpalves arthurpalves added this to the Release 1.1.4 milestone Apr 25, 2023
arthurpalves added a commit that referenced this issue Oct 19, 2023
* FIX: Github Marketplace action not picking up the latest release automatically [#189]
* FIX: Calling variants setup on M1 mac uses M1 unsupported gems in Gemfile [#208]
* FIX: Variants setup on M1 mac does not automatically link variants.xcconfig to xcodeproject [#209]
* FIX: Some signing configurations not automatically set in Xcode 14 [#214]

* REFACTOR: Signing configuration is updated not only during `setup` but also during `switch` [#215]
* REFACTOR: Items in `variants.xcconfig` should be sorted alphabetically [#219]

* FEATURE: Ability to add a `postSwitch` command/script, both globally or variant specific [#221]
* FEATURE:  Add ability to override app name per variant [#216]
* FEATURE: Expose configuration keys as static variables in swift [#125]
 
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: romanhu-bb <93975733+romanhu-bb@users.noreply.github.com>
Co-authored-by: Aksay Pudukudi Kandhadai (BB) <akshayp@backbase.com>
Co-authored-by: Divine Dube <dubedivine@gmail.com>
Co-authored-by: Nour Sandid <nour@backbase.com>
Co-authored-by: noursandidb <92526468+noursandidb@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Minucci <gabriel@minucci.com.br>
Co-authored-by: Alex Kuziaev <theperfectprogrammer@gmail.com>
arthurpalves added a commit that referenced this issue Oct 26, 2023
* FIX: Github Marketplace action not picking up the latest release automatically [#189]
* FIX: Calling variants setup on M1 mac uses M1 unsupported gems in Gemfile [#208]
* FIX: Variants setup on M1 mac does not automatically link variants.xcconfig to xcodeproject [#209]
* FIX: Some signing configurations not automatically set in Xcode 14 [#214]

* REFACTOR: Signing configuration is updated not only during `setup` but also during `switch` [#215]
* REFACTOR: Items in `variants.xcconfig` should be sorted alphabetically [#219]

* FEATURE: Ability to add a `postSwitch` command/script, both globally or variant specific [#221]
* FEATURE:  Add ability to override app name per variant [#216]
* FEATURE: Expose configuration keys as static variables in swift [#125]
 
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: romanhu-bb <93975733+romanhu-bb@users.noreply.github.com>
Co-authored-by: Aksay Pudukudi Kandhadai (BB) <akshayp@backbase.com>
Co-authored-by: Divine Dube <dubedivine@gmail.com>
Co-authored-by: Nour Sandid <nour@backbase.com>
Co-authored-by: noursandidb <92526468+noursandidb@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Minucci <gabriel@minucci.com.br>
Co-authored-by: Alex Kuziaev <theperfectprogrammer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants