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

Fix setting provisioning profile specifiers for specific SDKs #371

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Nov 8, 2023

Setting code signing settings for Xcode project with xcode-project use-profiles does not override platform-specific provisioning profile assignations. For example, if my project file already contains entry such as

"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Original Profile";

then running xcode-project use-profile just adds another PROVISIONING_PROFILE_SPECIFIER definition for the target:

PROVISIONING_PROFILE_SPECIFIER = "Another Profile";

which results in a conflicting provisioning code signing setup because both profiles are defined in the project.pbxproj file:

"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Original Profile";
PROVISIONING_PROFILE_SPECIFIER = "Another Profile";

Now, if the original profile that is referenced for specific SDK does not exist in ~/Library/MobileDevice/Provisioning Profiles, which might very well be the case when build is running on a VM from CI environment, then xcodebuild build is destined to fail.

Changes to code_signing_manager.rb ensure that all PROVISIONING_PROFILE_SPECIFIER build settings for target are properly updated when xcode-project use-profiles is launched.

Updated actions:

  • xcode-project use-profiles

@priitlatt priitlatt changed the title Update SDK specfic PROVISIONING_PROFILE_SPECIFIER entries Fix setting provisioning profile specifiers for specific SDKs Nov 8, 2023
@priitlatt priitlatt added the bug Something isn't working label Nov 8, 2023
@priitlatt priitlatt marked this pull request as ready for review November 8, 2023 14:46
@priitlatt priitlatt merged commit 9debd59 into master Nov 8, 2023
7 checks passed
@priitlatt priitlatt deleted the bugfix/xcode-project-use-profiles-sdk-specific-profile-specifier branch November 8, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant