Bugfix: Do not rely on provisioning profile ordering on disk for xcode-project use-profiles
#308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two invocations of
xcode-project use-profiles
can lead to different modifications to Xcode project files even though the very same set of provisioning profiles are discovered. This can happen because the scriptcode_signing_manager.rb
, which is used internally for updating*.xcodeproj
files, depends on the order of provisioning profiles that are passed to it.In order to avoid such inconsistencies, make sure that profiles are sorted in a stable manner before serializing them for
code_signing_manager.rb
. The changes in this PR ensure that profiles are ordered so thatcom.example.app.extension
is more specific thancom.example.app
andcom.example.app.*
is more specific thancom.example.*
, which is more specific than just*
.For example this is how those provisioning profiles would be ordered.
io.codemagic.banaan.UITests.xctrunner
io.codemagic.banaan.Clip
io.codemagic.banaan
io.codemagic.capybara
io.codemagic.*
io.codemagic.*
*
*
Updated actions:
xcode-project use-profiles