diff --git a/lib/services/ios/xcodebuild-args-service.ts b/lib/services/ios/xcodebuild-args-service.ts index ae47d13cd0..2282eecbbe 100644 --- a/lib/services/ios/xcodebuild-args-service.ts +++ b/lib/services/ios/xcodebuild-args-service.ts @@ -115,12 +115,17 @@ 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, ]; } @@ -128,7 +133,13 @@ export class XcodebuildArgsService implements IXcodebuildArgsService { projectRoot, `${projectData.projectName}.xcodeproj` ); - return ["-project", xcodeprojPath, "-scheme", projectData.projectName]; + return [ + "-project", + xcodeprojPath, + "-scheme", + projectData.projectName, + skipPackageValidation, + ]; } private getBuildLoggingArgs(): string[] {