Skip to content

Commit

Permalink
fix(ios): skip package validation on xcodebuild (#5782)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Feb 1, 2024
1 parent 0ec3b5e commit e47cff4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/services/ios/xcodebuild-args-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,31 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
projectRoot,
`${projectData.projectName}.xcworkspace`
);
// Introduced in Xcode 14+
// ref: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/5
const skipPackageValidation = "-skipPackagePluginValidation";

if (this.$fs.exists(xcworkspacePath)) {
return [
"-workspace",
xcworkspacePath,
"-scheme",
projectData.projectName,
skipPackageValidation,
];
}

const xcodeprojPath = path.join(
projectRoot,
`${projectData.projectName}.xcodeproj`
);
return ["-project", xcodeprojPath, "-scheme", projectData.projectName];
return [
"-project",
xcodeprojPath,
"-scheme",
projectData.projectName,
skipPackageValidation,
];
}

private getBuildLoggingArgs(): string[] {
Expand Down

0 comments on commit e47cff4

Please sign in to comment.