nativescript 9.0.0-alpha.14 → 9.0.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -119,9 +119,25 @@ class BuildVisionOsCommand extends BuildIosCommand {
119
119
  this.$options = $options;
120
120
  this.$migrateController = $migrateController;
121
121
  }
122
+ async execute(args) {
123
+ await this.executeCore([
124
+ this.$devicePlatformsConstants.visionOS.toLowerCase(),
125
+ ]);
126
+ }
122
127
  async canExecute(args) {
123
- this.$errors.fail('Building for "visionOS" platform is not supported via the CLI. Please open the project in Xcode and build it from there.');
124
- return false;
128
+ const platform = this.$devicePlatformsConstants.visionOS;
129
+ if (!this.$options.force) {
130
+ await this.$migrateController.validate({
131
+ projectDir: this.$projectData.projectDir,
132
+ platforms: [platform],
133
+ });
134
+ }
135
+ super.validatePlatform(platform);
136
+ let canExecute = await super.canExecuteCommandBase(platform);
137
+ if (canExecute) {
138
+ canExecute = await super.validateArgs(args, platform);
139
+ }
140
+ return canExecute;
125
141
  }
126
142
  }
127
143
  exports.BuildVisionOsCommand = BuildVisionOsCommand;
@@ -10,7 +10,6 @@ exports.BundlerCompilerService = void 0;
10
10
  const path = require("path");
11
11
  const semver = require("semver");
12
12
  const _ = require("lodash");
13
- // TODO: can switch to file-system service
14
13
  const events_1 = require("events");
15
14
  const decorators_1 = require("../../common/decorators");
16
15
  const constants_1 = require("../../constants");
@@ -27,7 +27,7 @@ class XcodebuildArgsService {
27
27
  let destination = "generic/platform=iOS Simulator";
28
28
  let isvisionOS = this.$devicePlatformsConstants.isvisionOS(buildConfig.platform);
29
29
  if (isvisionOS) {
30
- destination = "platform=visionOS Simulator";
30
+ destination = "generic/platform=visionOS Simulator";
31
31
  if (buildConfig._device) {
32
32
  destination += `,id=${buildConfig._device.deviceInfo.identifier}`;
33
33
  }
@@ -40,7 +40,9 @@ class XcodebuildArgsService {
40
40
  "-configuration",
41
41
  buildConfig.release ? constants_1.Configurations.Release : constants_1.Configurations.Debug,
42
42
  ])
43
- .concat(this.getBuildCommonArgs(platformData, projectData, isvisionOS ? ios_project_service_1.VisionSimulatorPlatformSdkName : ios_project_service_1.SimulatorPlatformSdkName))
43
+ .concat(this.getBuildCommonArgs(platformData, projectData, isvisionOS
44
+ ? ios_project_service_1.VisionSimulatorPlatformSdkName
45
+ : ios_project_service_1.SimulatorPlatformSdkName))
44
46
  .concat(this.getBuildLoggingArgs())
45
47
  .concat(this.getXcodeProjectArgs(platformData, projectData));
46
48
  return args;
@@ -51,7 +53,7 @@ class XcodebuildArgsService {
51
53
  let destination = "generic/platform=iOS";
52
54
  let isvisionOS = this.$devicePlatformsConstants.isvisionOS(buildConfig.platform);
53
55
  if (isvisionOS) {
54
- destination = "platform=visionOS";
56
+ destination = "generic/platform=visionOS";
55
57
  if (buildConfig._device) {
56
58
  destination += `,id=${buildConfig._device.deviceInfo.identifier}`;
57
59
  }
@@ -68,14 +70,16 @@ class XcodebuildArgsService {
68
70
  ]
69
71
  .concat(this.getXcodeProjectArgs(platformData, projectData))
70
72
  .concat(architectures)
71
- .concat(this.getBuildCommonArgs(platformData, projectData, ios_project_service_1.DevicePlatformSdkName))
73
+ .concat(this.getBuildCommonArgs(platformData, projectData, isvisionOS ? ios_project_service_1.VisionDevicePlatformSdkName : ios_project_service_1.DevicePlatformSdkName))
72
74
  .concat(this.getBuildLoggingArgs());
73
75
  return args;
74
76
  }
75
77
  async getArchitecturesArgs(buildConfig) {
76
78
  const args = [];
77
79
  if (this.$devicePlatformsConstants.isvisionOS(buildConfig.platform)) {
78
- args.push("ONLY_ACTIVE_ARCH=YES");
80
+ // visionOS builds (device/simulator) are arm64-only; rely on destination for arch
81
+ // and explicitly exclude x86_64 to avoid accidental selection
82
+ args.push("ONLY_ACTIVE_ARCH=YES", "EXCLUDED_ARCHS=x86_64");
79
83
  return args;
80
84
  }
81
85
  const devicesArchitectures = buildConfig.buildForDevice
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nativescript",
3
3
  "main": "./lib/nativescript-cli-lib.js",
4
- "version": "9.0.0-alpha.14",
4
+ "version": "9.0.0-alpha.15",
5
5
  "author": "NativeScript <oss@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {