Skip to content

Commit 943eec6

Browse files
authored
fix: codebuild destination warning (#5564)
* fix: xcodebuild destination warning * test: update tests
1 parent 42cbdc5 commit 943eec6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/services/ios/xcodebuild-args-service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,15 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
3838
let productType: ProductArgs;
3939
if (this.$iOSWatchAppService.hasWatchApp(platformData, projectData)) {
4040
productType = ProductArgs.scheme;
41-
args = args.concat([
42-
"-destination",
43-
"generic/platform=iOS Simulator",
44-
"CODE_SIGNING_ALLOWED=NO",
45-
]);
41+
args = args.concat(["CODE_SIGNING_ALLOWED=NO"]);
4642
} else {
4743
args = args.concat(["CODE_SIGN_IDENTITY="]);
4844
}
4945

5046
args = args
5147
.concat([
48+
"-destination",
49+
"generic/platform=iOS Simulator",
5250
"build",
5351
"-configuration",
5452
buildConfig.release ? Configurations.Release : Configurations.Debug,
@@ -83,6 +81,8 @@ export class XcodebuildArgsService implements IXcodebuildArgsService {
8381
projectData.projectName + ".xcarchive"
8482
);
8583
const args = [
84+
"-destination",
85+
"generic/platform=iOS",
8686
"archive",
8787
"-archivePath",
8888
archivePath,

test/services/ios/xcodebuild-args-service.ts

+4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ describe("xcodebuildArgsService", () => {
9696
const expectedArgs = [
9797
"ONLY_ACTIVE_ARCH=NO",
9898
"CODE_SIGN_IDENTITY=",
99+
"-destination",
100+
"generic/platform=iOS Simulator",
99101
"build",
100102
"-configuration",
101103
configuration,
@@ -170,6 +172,8 @@ describe("xcodebuildArgsService", () => {
170172
);
171173

172174
const expectedArgs = [
175+
"-destination",
176+
"generic/platform=iOS",
173177
"archive",
174178
"-archivePath",
175179
path.join(buildOutputPath, `${projectName}.xcarchive`),

0 commit comments

Comments
 (0)