nativescript 9.0.6-dev.1 → 9.0.6-dev.2

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.
@@ -74,6 +74,8 @@ class IOSWatchAppService {
74
74
  const targetUuids = [];
75
75
  const targetNames = [];
76
76
  const appPath = path.join(watchAppFolderPath, constants_1.IOS_WATCHAPP_FOLDER);
77
+ const extensionPath = path.join(watchAppFolderPath, constants_1.IOS_WATCHAPP_EXTENSION_FOLDER);
78
+ const hasWatchExtension = this.$fs.exists(extensionPath);
77
79
  // Check if watchapp exists - it's required
78
80
  if (!this.$fs.exists(appPath)) {
79
81
  return false;
@@ -90,12 +92,11 @@ class IOSWatchAppService {
90
92
  project.removeTargetsByProductType(targetType);
91
93
  const parentTargetUuid = project.getFirstTarget().uuid;
92
94
  const watchApptarget = this.addTarget(appPath, appFolder, targetType, project, platformData, parentTargetUuid, constants_1.IOSNativeTargetTypes.watchApp);
93
- await this.configureTarget(appFolder, path.join(appPath, appFolder), `${projectData.projectIdentifiers.ios}.${WATCH_APP_IDENTIFIER}`, configPath, config, watchApptarget, project, projectData, platformData, pbxProjPath);
95
+ await this.configureTarget(appFolder, path.join(appPath, appFolder), `${projectData.projectIdentifiers.ios}.${WATCH_APP_IDENTIFIER}`, configPath, config, watchApptarget, project, projectData, platformData, pbxProjPath, !hasWatchExtension);
94
96
  targetUuids.push(watchApptarget.uuid);
95
97
  targetNames.push(appFolder);
96
- const extensionPath = path.join(watchAppFolderPath, constants_1.IOS_WATCHAPP_EXTENSION_FOLDER);
97
98
  // Extension is optional (Xcode 14+ supports single target)
98
- if (this.$fs.exists(extensionPath)) {
99
+ if (hasWatchExtension) {
99
100
  const extensionFolder = this.$iOSNativeTargetService.getTargetDirectories(extensionPath)[0];
100
101
  const configPath = path.join(path.join(extensionPath, extensionFolder), "extension.json");
101
102
  const config = this.$fs.exists(configPath)
@@ -213,7 +214,7 @@ class IOSWatchAppService {
213
214
  const watchAppPath = path.join(projectData.getAppResourcesDirectoryPath(), platformData.normalizedPlatformName, constants_1.IOS_WATCHAPP_FOLDER);
214
215
  return this.$fs.exists(watchAppPath);
215
216
  }
216
- async configureTarget(targetName, targetPath, identifier, configPath, config, target, project, projectData, platformData, pbxProjPath) {
217
+ async configureTarget(targetName, targetPath, identifier, configPath, config, target, project, projectData, platformData, pbxProjPath, disableStubBinary = false) {
217
218
  const identifierParts = identifier.split(".");
218
219
  identifierParts.pop();
219
220
  const wkAppBundleIdentifier = identifierParts.join(".");
@@ -225,6 +226,9 @@ class IOSWatchAppService {
225
226
  { name: "WATCHOS_DEPLOYMENT_TARGET", value: 5.2 },
226
227
  { name: "WK_APP_BUNDLE_IDENTIFIER", value: wkAppBundleIdentifier },
227
228
  ];
229
+ if (disableStubBinary) {
230
+ buildConfigProperties.push({ name: "PRODUCT_BINARY_SOURCE_PATH", value: '""' }, { name: "PRODUCT_TYPE_HAS_STUB_BINARY", value: "NO" });
231
+ }
228
232
  const resourcesGroup = targetName + "Resources";
229
233
  project.addPbxGroup([], resourcesGroup, project.filepath, null, {
230
234
  isMain: true,
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.6-dev.1",
4
+ "version": "9.0.6-dev.2",
5
5
  "author": "NativeScript <oss@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {