-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add -packageAuthorizationProvider flag for xcodebuild #22227
Add -packageAuthorizationProvider flag for xcodebuild #22227
Conversation
@joshdholtz @rogerluan would love your review and a potential patch release when you have the time; without this fix, it is currently hanging our CI, and i'm sure others will be coming out the woodwork soon when they move to Xcode 16 if they have private frameworks being fetched with SPM that need authorization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this issue 🙏🏻
Due to time constraints, I didn't actually download Xcode 16 and test this, but having a test and just by looking at the changes, I'm pretty confident that there should be no breaking changes, as it only adds a new and optional option (😅) to gym
, scan
, and snapshot
.
Only left one small note for an inconsistent environment variable name, which I consider a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks 🙏 for adding this fix 🚀 , I've added one comment. Could you please take a look at it :)?
Co-authored-by: iulianOnofrei (U-lee-aan) <5748627+revolter@users.noreply.github.com>
Appreciate the reviews 🙏 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
With the new Xcode 16 RC, we have seen hangs in our project when resolving dependencies due to a new flag to xcodebuild that chooses the correct packageAuthorizationProvider when checking out packages.
Quoting from Apple's Xcode 16 RC release notes:
"Fixed: The new xcodebuild flag of -packageAuthorizationProvider keychain|netrc can now be used to force usage of keychain or netrc as the authorizaion provider. This improves Xcode’s package registry support. (118898849)"
Xcode 16 RC Release Notes
This adds an option for users to choose what authorization provider (i.e. netrc / keychain). This resolves all our hang issues and has been tested locally in our product.
Description
This PR adds a packageAuthorizationProvider option for xcodebuild to set a string with the correct authorization provider. This can be used like so:
Testing Steps
Please run an example app and use
package_authorization_provider: "netrc"
as an option, and make sure that when resolving dependencies, there is the-packageAuthorizationProvider netrc
as part of the xcodebuild:xcodebuild -resolvePackageDependencies -scheme Foo -project Example.xcodeproj -packageAuthorizationProvider netrc