Content-Length: 6636 | pFad | http://github.com/NativeScript/nativescript-cli/pull/5784.patch
thub.com
From 5486ea5c900a99d40486987f2d8a9f3bb07927ed Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Mon, 29 Jan 2024 11:28:09 -0800
Subject: [PATCH 1/3] fix(ios): ensure user defined build.xcconfig takes
precedence
---
lib/services/ios/xcodebuild-args-service.ts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/services/ios/xcodebuild-args-service.ts b/lib/services/ios/xcodebuild-args-service.ts
index 2282eecbbe..e815aff982 100644
--- a/lib/services/ios/xcodebuild-args-service.ts
+++ b/lib/services/ios/xcodebuild-args-service.ts
@@ -119,6 +119,12 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
// ref: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/5
const skipPackageValidation = "-skipPackagePluginValidation";
+ const BUILD_SETTINGS_FILE_PATH = path.join(
+ projectData.appResourcesDirectoryPath,
+ "iOS",
+ constants.BUILD_XCCONFIG_FILE_NAME
+ );
+
if (this.$fs.exists(xcworkspacePath)) {
return [
"-workspace",
@@ -126,6 +132,8 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
"-scheme",
projectData.projectName,
skipPackageValidation,
+ "-xcconfig",
+ BUILD_SETTINGS_FILE_PATH,
];
}
@@ -139,6 +147,8 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
"-scheme",
projectData.projectName,
skipPackageValidation,
+ "-xcconfig",
+ BUILD_SETTINGS_FILE_PATH,
];
}
From 5aa603a6b3ab1cb10f002eea7ee6543cb287ee56 Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Mon, 29 Jan 2024 11:29:30 -0800
Subject: [PATCH 2/3] chore: note
---
lib/services/ios/xcodebuild-args-service.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/services/ios/xcodebuild-args-service.ts b/lib/services/ios/xcodebuild-args-service.ts
index e815aff982..64b0a01d3c 100644
--- a/lib/services/ios/xcodebuild-args-service.ts
+++ b/lib/services/ios/xcodebuild-args-service.ts
@@ -119,6 +119,9 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
// ref: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/5
const skipPackageValidation = "-skipPackagePluginValidation";
+ // TODO:
+ // 1. make sure file exists
+ // 2. use ios/visionos based on platform target
const BUILD_SETTINGS_FILE_PATH = path.join(
projectData.appResourcesDirectoryPath,
"iOS",
From ba5edbee6702483e1e96130159b1fa9edb95acde Mon Sep 17 00:00:00 2001
From: Nathan Walker
Date: Thu, 1 Feb 2024 15:36:10 -0800
Subject: [PATCH 3/3] chore: cleanup
---
lib/definitions/ios.d.ts | 2 +-
lib/services/ios/spm-service.ts | 2 +-
lib/services/ios/xcodebuild-args-service.ts | 46 +++++++++------------
3 files changed, 21 insertions(+), 29 deletions(-)
diff --git a/lib/definitions/ios.d.ts b/lib/definitions/ios.d.ts
index 5e766c39ca..248b25b7b4 100644
--- a/lib/definitions/ios.d.ts
+++ b/lib/definitions/ios.d.ts
@@ -57,7 +57,7 @@ declare global {
buildConfig: IBuildConfig
): Promise;
getXcodeProjectArgs(
- projectRoot: string,
+ platformData: IPlatformData,
projectData: IProjectData
): string[];
}
diff --git a/lib/services/ios/spm-service.ts b/lib/services/ios/spm-service.ts
index c5da44cd64..0d654e45bc 100644
--- a/lib/services/ios/spm-service.ts
+++ b/lib/services/ios/spm-service.ts
@@ -78,7 +78,7 @@ export class SPMService implements ISPMService {
) {
await this.$xcodebuildCommandService.executeCommand(
this.$xcodebuildArgsService
- .getXcodeProjectArgs(platformData.projectRoot, projectData)
+ .getXcodeProjectArgs(platformData, projectData)
.concat([
"-destination",
"generic/platform=iOS",
diff --git a/lib/services/ios/xcodebuild-args-service.ts b/lib/services/ios/xcodebuild-args-service.ts
index 64b0a01d3c..3b74d0b28e 100644
--- a/lib/services/ios/xcodebuild-args-service.ts
+++ b/lib/services/ios/xcodebuild-args-service.ts
@@ -53,7 +53,7 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
)
)
.concat(this.getBuildLoggingArgs())
- .concat(this.getXcodeProjectArgs(platformData.projectRoot, projectData));
+ .concat(this.getXcodeProjectArgs(platformData, projectData));
return args;
}
@@ -78,7 +78,7 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
buildConfig.release ? Configurations.Release : Configurations.Debug,
"-allowProvisioningUpdates",
]
- .concat(this.getXcodeProjectArgs(platformData.projectRoot, projectData))
+ .concat(this.getXcodeProjectArgs(platformData, projectData))
.concat(architectures)
.concat(
this.getBuildCommonArgs(
@@ -108,51 +108,43 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
}
public getXcodeProjectArgs(
- projectRoot: string,
+ platformData: IPlatformData,
projectData: IProjectData
): string[] {
const xcworkspacePath = path.join(
- projectRoot,
+ platformData.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";
- // TODO:
- // 1. make sure file exists
- // 2. use ios/visionos based on platform target
+ const extraArgs: string[] = [
+ "-scheme",
+ projectData.projectName,
+ skipPackageValidation,
+ ];
+
const BUILD_SETTINGS_FILE_PATH = path.join(
projectData.appResourcesDirectoryPath,
- "iOS",
+ platformData.normalizedPlatformName,
constants.BUILD_XCCONFIG_FILE_NAME
);
+ if (this.$fs.exists(BUILD_SETTINGS_FILE_PATH)) {
+ extraArgs.push("-xcconfig");
+ extraArgs.push(BUILD_SETTINGS_FILE_PATH);
+ }
+
if (this.$fs.exists(xcworkspacePath)) {
- return [
- "-workspace",
- xcworkspacePath,
- "-scheme",
- projectData.projectName,
- skipPackageValidation,
- "-xcconfig",
- BUILD_SETTINGS_FILE_PATH,
- ];
+ return ["-workspace", xcworkspacePath, ...extraArgs];
}
const xcodeprojPath = path.join(
- projectRoot,
+ platformData.projectRoot,
`${projectData.projectName}.xcodeproj`
);
- return [
- "-project",
- xcodeprojPath,
- "-scheme",
- projectData.projectName,
- skipPackageValidation,
- "-xcconfig",
- BUILD_SETTINGS_FILE_PATH,
- ];
+ return ["-project", xcodeprojPath, ...extraArgs];
}
private getBuildLoggingArgs(): string[] {
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/NativeScript/nativescript-cli/pull/5784.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy