If you use Local Package with Xcode's default integration mechanism, the .package.resolved file is not generated by Tuist, so builds will fail on Xcode Cloud, which expects the existence of a *.xcworkspace/xcshareddata/swiftpm/Package.resolved
file.
tuist generate --no-open
.package.resolved
file should be present but is missing.*.xcworkspace/xcshareddata/swiftpm/Package.resolved
should have been generated, but it's not there.Resolve package dependencies
task locally.Simulate Xcode Cloud's Resolve package dependencies
task locally.
$ xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile -disableAutomaticPackageResolution -workspace ./MyWorkspace.xcworkspace -scheme TuistMinimalReproduction -hideShellScriptEnvironment
The following error outputs:
Command line invocation:
/Applications/Xcode-15.4.0.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile -disableAutomaticPackageResolution -workspace ./MyWorkspace.xcworkspace -scheme TuistMinimalReproduction -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageOnlyUseVersionsFromResolvedFile = YES
IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
a resolved file is required when automatic dependency resolution is disabled and should be placed at /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'swift-algorithms' (https://github.com/apple/swift-algorithms)
Resolved source packages:
MyPackage: /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyPackage
2024-05-28 16:08:50.337 xcodebuild[90624:1899640] Writing error result bundle to /var/folders/bz/2q5vvytd059by91lfx4b39380000gn/T/ResultBundle_2024-28-05_16-08-0050.xcresult
xcodebuild: error: Could not resolve package dependencies:
a resolved file is required when automatic dependency resolution is disabled and should be placed at /Users/tdkn/Workspaces/private/TuistMinimalReproduction/MyWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved. Running resolver because the following dependencies were added: 'swift-algorithms' (https://github.com/apple/swift-algorithms)
14.4.1
4.14.0
15.4
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too