Skip to content

Commit a34c876

Browse files
committed
Revert passing additional options
1 parent 2fdb093 commit a34c876

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

step/step.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,12 @@ func (s XcodebuildArchiver) xcodeArchive(opts xcodeArchiveOpts) (xcodeArchiveRes
816816

817817
s.logger.TInfof("Reading xcode project")
818818

819-
platform, err := BuildableTargetPlatform(xcodeProj, scheme, configuration, opts.AdditionalOptions, XcodeBuild{}, s.logger)
819+
// When Package.resolved is embedded in the workspace, passing additional options can cause failure ("-onlyUsePackageVersionsFromResolvedFile" "-skipMacroValidation" "-skipPackagePluginValidation")
820+
// 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.
821+
// An alternative to passing "-onlyUsePackageVersionsFromResolvedFile" or "-disableAutomaticPackageResolution" is to set the following defaults in a Script Step:
822+
// defaults write com.apple.dt.Xcode IDEPackageOnlyUseVersionsFromResolvedFile
823+
// defaults write com.apple.dt.Xcode IDEDisableAutomaticPackageResolution
824+
platform, err := BuildableTargetPlatform(xcodeProj, scheme, configuration, []string{}, XcodeBuild{}, s.logger)
820825
if err != nil {
821826
return out, fmt.Errorf("failed to read project platform: %s: %s", opts.ProjectPath, err)
822827
}

0 commit comments

Comments
 (0)