Skip to content

Add input to disable Swift Package updates #374

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Add input to disable Swift Package updates #374

wants to merge 13 commits into from

Conversation

lpusok
Copy link
Contributor

@lpusok lpusok commented Mar 31, 2025

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

Requires a MINOR version update

Context

We previously changed xcode-archive Step to pass additional options the the -showBuildSettings command:
https://github.com/bitrise-steplib/steps-xcode-archive/pull/357/files

This fix was only partial and did not help achieve the required result, which is to pass the flags (-onlyUsePackageVersionsFromResolvedFile -disableAutomaticPackageResolution) to xcodebuild. These prevent Swift package versions automatically upgraded.
In addition it caused failures in cases when there was a Package.resolved file embedded in the xcworkpsace, but not in the xcproj. (a resolved file is required when automatic dependency resolution is disabled and should be placed at [ ... ]/git/sample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved.)

Instead of setting additional options; set the Disable Swift Package Manager automatic resolution (lock_swift_packages) Input to yes.

This writes the following Xcode defaults:

defaults write com.apple.dt.Xcode IDEPackageOnlyUseVersionsFromResolvedFile -bool YES
defaults write com.apple.dt.Xcode IDEDisableAutomaticPackageResolution -bool YES

Changes

Investigation details

Decisions

@lpusok lpusok changed the title Revert passing additional options Add input to disable Swift Package updates Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant