nativescript 9.1.0-alpha.0 → 9.1.0-alpha.10
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.
- package/README.md +49 -0
- package/config/test-deps-versions-generated.json +3 -3
- package/lib/.d.ts +1 -0
- package/lib/bootstrap.js +0 -2
- package/lib/commands/build.js +1 -30
- package/lib/commands/prepare.js +5 -0
- package/lib/commands/run.js +1 -39
- package/lib/commands/widget.js +1 -2
- package/lib/common/definitions/mobile.d.ts +15 -13
- package/lib/common/file-system.js +11 -15
- package/lib/common/mobile/android/android-emulator-services.js +11 -3
- package/lib/common/mobile/device-platforms-constants.js +0 -4
- package/lib/common/mobile/emulator-helper.js +1 -0
- package/lib/common/mobile/ios/device/ios-device-file-system.js +29 -1
- package/lib/common/mobile/mobile-helper.js +1 -12
- package/lib/constants.js +7 -2
- package/lib/controllers/prepare-controller.js +53 -39
- package/lib/controllers/run-controller.js +200 -13
- package/lib/data/prepare-data.js +4 -0
- package/lib/declarations.d.ts +38 -42
- package/lib/definitions/nativescript-dev-xcode.d.ts +25 -1
- package/lib/definitions/project.d.ts +51 -6
- package/lib/key-commands/bootstrap.js +0 -1
- package/lib/key-commands/index.js +1 -53
- package/lib/options.js +1 -0
- package/lib/project-data.js +0 -6
- package/lib/services/android-plugin-build-service.js +20 -12
- package/lib/services/bundler/bundler-compiler-service.js +182 -13
- package/lib/services/debug-service-base.js +1 -1
- package/lib/services/ios/ios-signing-service.js +10 -3
- package/lib/services/ios/spm-service.js +1 -8
- package/lib/services/ios/xcodebuild-args-service.js +36 -29
- package/lib/services/ios-entitlements-service.js +3 -1
- package/lib/services/ios-project-service.js +55 -78
- package/lib/services/ios-watch-app-service.js +663 -16
- package/lib/services/livesync/ios-livesync-service.js +113 -2
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +16 -28
- package/lib/services/project-changes-service.js +4 -15
- package/lib/services/project-data-service.js +16 -31
- package/lib/services/versions-service.js +0 -4
- package/lib/tools/config-manipulation/config-transformer.js +55 -3
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/universal-analytics/.travis.yml +11 -0
- package/node_modules/universal-analytics/AcceptableParams.md +757 -0
- package/node_modules/universal-analytics/HISTORY.md +170 -0
- package/node_modules/universal-analytics/Makefile +5 -0
- package/node_modules/universal-analytics/README.md +651 -0
- package/node_modules/universal-analytics/index.js +2 -0
- package/node_modules/universal-analytics/lib/config.js +171 -0
- package/node_modules/universal-analytics/lib/index.js +563 -0
- package/node_modules/universal-analytics/lib/request.js +73 -0
- package/node_modules/universal-analytics/lib/utils.js +29 -0
- package/node_modules/universal-analytics/package.json +33 -0
- package/node_modules/universal-analytics/test/_enqueue.js +144 -0
- package/node_modules/universal-analytics/test/event.js +346 -0
- package/node_modules/universal-analytics/test/exception.js +233 -0
- package/node_modules/universal-analytics/test/index.js +141 -0
- package/node_modules/universal-analytics/test/item.js +550 -0
- package/node_modules/universal-analytics/test/middleware.js +119 -0
- package/node_modules/universal-analytics/test/mocha.opts +3 -0
- package/node_modules/universal-analytics/test/pageview.js +286 -0
- package/node_modules/universal-analytics/test/send.js +232 -0
- package/node_modules/universal-analytics/test/set.js +68 -0
- package/node_modules/universal-analytics/test/timing.js +363 -0
- package/node_modules/universal-analytics/test/transaction.js +371 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +510 -0
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm/index.js +14 -0
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm/regex.js +1 -0
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +36 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +17 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +14 -0
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +135 -0
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +9 -0
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +11 -0
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +70 -0
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +35 -0
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +83 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +27 -0
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +17 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +5 -0
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +8 -0
- package/node_modules/uuid/package.json +132 -0
- package/package.json +29 -14
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.IOSProjectService = exports.
|
|
9
|
+
exports.IOSProjectService = exports.VisionSimulatorPlatformSdkName = exports.VisionDevicePlatformSdkName = exports.SimulatorPlatformSdkName = exports.DevicePlatformSdkName = void 0;
|
|
10
10
|
const path = require("path");
|
|
11
11
|
const shell = require("shelljs");
|
|
12
12
|
const _ = require("lodash");
|
|
@@ -26,24 +26,17 @@ exports.DevicePlatformSdkName = "iphoneos";
|
|
|
26
26
|
exports.SimulatorPlatformSdkName = "iphonesimulator";
|
|
27
27
|
exports.VisionDevicePlatformSdkName = "xros";
|
|
28
28
|
exports.VisionSimulatorPlatformSdkName = "xrsimulator";
|
|
29
|
-
exports.MacOSPlatformSdkName = "macosx";
|
|
30
29
|
const FRAMEWORK_EXTENSIONS = [".framework", ".xcframework"];
|
|
31
30
|
const getPlatformSdkName = (buildData) => {
|
|
32
31
|
const forDevice = !buildData || buildData.buildForDevice || buildData.buildForAppStore;
|
|
33
32
|
const isvisionOS = yok_1.injector
|
|
34
33
|
.resolve("devicePlatformsConstants")
|
|
35
34
|
.isvisionOS(buildData.platform);
|
|
36
|
-
const ismacOS = yok_1.injector
|
|
37
|
-
.resolve("devicePlatformsConstants")
|
|
38
|
-
.ismacOS(buildData.platform);
|
|
39
35
|
if (isvisionOS) {
|
|
40
36
|
return forDevice
|
|
41
37
|
? exports.VisionDevicePlatformSdkName
|
|
42
38
|
: exports.VisionSimulatorPlatformSdkName;
|
|
43
39
|
}
|
|
44
|
-
if (ismacOS) {
|
|
45
|
-
return exports.MacOSPlatformSdkName;
|
|
46
|
-
}
|
|
47
40
|
return forDevice ? exports.DevicePlatformSdkName : exports.SimulatorPlatformSdkName;
|
|
48
41
|
};
|
|
49
42
|
const getConfigurationName = (release) => {
|
|
@@ -79,6 +72,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
79
72
|
this.$mobileHelper = $mobileHelper;
|
|
80
73
|
this.$projectConfigService = $projectConfigService;
|
|
81
74
|
this._platformsDirCache = null;
|
|
75
|
+
this._platformOverrideCache = null;
|
|
82
76
|
this._platformData = null;
|
|
83
77
|
// Track added frameworks by name to prevent duplicates in monorepo/workspace setups
|
|
84
78
|
// where the same plugin may exist in multiple node_modules paths
|
|
@@ -87,19 +81,20 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
87
81
|
this._addedStaticLibs = new Set();
|
|
88
82
|
}
|
|
89
83
|
getPlatformData(projectData) {
|
|
90
|
-
var _a;
|
|
84
|
+
var _a, _b;
|
|
91
85
|
if (!projectData && !this._platformData) {
|
|
92
86
|
throw new Error("First call of getPlatformData without providing projectData.");
|
|
93
87
|
}
|
|
88
|
+
const currentOverride = (_a = this.$options.platformOverride) !== null && _a !== void 0 ? _a : null;
|
|
94
89
|
if (projectData &&
|
|
95
90
|
projectData.platformsDir &&
|
|
96
|
-
this._platformsDirCache !== projectData.platformsDir
|
|
97
|
-
|
|
91
|
+
(this._platformsDirCache !== projectData.platformsDir ||
|
|
92
|
+
this._platformOverrideCache !== currentOverride)) {
|
|
93
|
+
const platform = this.$mobileHelper.normalizePlatformName((_b = this.$options.platformOverride) !== null && _b !== void 0 ? _b : this.$devicePlatformsConstants.iOS);
|
|
98
94
|
const projectRoot = this.$options.hostProjectPath
|
|
99
95
|
? this.$options.hostProjectPath
|
|
100
96
|
: path.join(projectData.platformsDir, platform.toLowerCase());
|
|
101
97
|
const runtimePackage = this.$projectDataService.getRuntimePackage(projectData.projectDir, platform.toLowerCase());
|
|
102
|
-
const isMacOSPlatform = this.$devicePlatformsConstants.ismacOS(platform);
|
|
103
98
|
this._platformData = {
|
|
104
99
|
frameworkPackageName: runtimePackage.name,
|
|
105
100
|
normalizedPlatformName: platform,
|
|
@@ -109,22 +104,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
109
104
|
projectRoot: projectRoot,
|
|
110
105
|
getBuildOutputPath: (options) => {
|
|
111
106
|
const config = getConfigurationName(!options || options.release);
|
|
112
|
-
if (isMacOSPlatform) {
|
|
113
|
-
return path.join(projectRoot, constants.BUILD_DIR, config);
|
|
114
|
-
}
|
|
115
107
|
return path.join(projectRoot, constants.BUILD_DIR, `${config}-${getPlatformSdkName(options)}`);
|
|
116
108
|
},
|
|
117
109
|
getValidBuildOutputData: (buildOptions) => {
|
|
118
|
-
const isMacOS = !!buildOptions &&
|
|
119
|
-
this.$devicePlatformsConstants.ismacOS(buildOptions.platform);
|
|
120
|
-
if (isMacOS) {
|
|
121
|
-
return {
|
|
122
|
-
packageNames: [
|
|
123
|
-
`${projectData.projectName}.app`,
|
|
124
|
-
`${projectData.projectName}.zip`,
|
|
125
|
-
],
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
110
|
const forDevice = !buildOptions ||
|
|
129
111
|
!!buildOptions.buildForDevice ||
|
|
130
112
|
!!buildOptions.buildForAppStore;
|
|
@@ -166,15 +148,11 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
166
148
|
".xbm",
|
|
167
149
|
], // https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/
|
|
168
150
|
};
|
|
151
|
+
this._platformsDirCache = projectData.platformsDir;
|
|
152
|
+
this._platformOverrideCache = currentOverride;
|
|
169
153
|
}
|
|
170
154
|
return this._platformData;
|
|
171
155
|
}
|
|
172
|
-
getPluginPlatform(projectData) {
|
|
173
|
-
var _a;
|
|
174
|
-
const platformData = this.getPlatformData(projectData);
|
|
175
|
-
return (((_a = platformData.normalizedPlatformName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) ||
|
|
176
|
-
platformData.platformNameLowerCase);
|
|
177
|
-
}
|
|
178
156
|
async validateOptions(projectId, provision, teamId) {
|
|
179
157
|
if (provision && teamId) {
|
|
180
158
|
this.$errors.fail("The options --provision and --teamId are mutually exclusive.");
|
|
@@ -287,8 +265,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
287
265
|
return Promise.resolve();
|
|
288
266
|
}
|
|
289
267
|
async isDynamicFramework(frameworkPath) {
|
|
290
|
-
const isDynamicFrameworkBundle = async (
|
|
291
|
-
const frameworkBinaryPath = path.join(bundlePath, frameworkName);
|
|
268
|
+
const isDynamicFrameworkBundle = async (frameworkBinaryPath) => {
|
|
292
269
|
const fileResult = (await this.$childProcess.spawnFromEvent("file", [frameworkBinaryPath], "close")).stdout;
|
|
293
270
|
const isDynamicallyLinked = _.includes(fileResult, "dynamically linked");
|
|
294
271
|
return isDynamicallyLinked;
|
|
@@ -300,7 +277,11 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
300
277
|
const singlePlatformFramework = path.join(frameworkPath, library.LibraryIdentifier, library.LibraryPath);
|
|
301
278
|
if (this.$fs.exists(singlePlatformFramework)) {
|
|
302
279
|
const frameworkName = path.basename(singlePlatformFramework, path.extname(singlePlatformFramework));
|
|
303
|
-
|
|
280
|
+
let frameworkBinaryPath = path.join(singlePlatformFramework, frameworkName);
|
|
281
|
+
if (library.BinaryPath) {
|
|
282
|
+
frameworkBinaryPath = path.join(frameworkPath, library.LibraryIdentifier, library.BinaryPath);
|
|
283
|
+
}
|
|
284
|
+
isDynamic = await isDynamicFrameworkBundle(frameworkBinaryPath);
|
|
304
285
|
break;
|
|
305
286
|
}
|
|
306
287
|
}
|
|
@@ -308,7 +289,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
308
289
|
}
|
|
309
290
|
else {
|
|
310
291
|
const frameworkName = path.basename(frameworkPath, path.extname(frameworkPath));
|
|
311
|
-
return await isDynamicFrameworkBundle(frameworkPath, frameworkName);
|
|
292
|
+
return await isDynamicFrameworkBundle(path.join(frameworkPath, frameworkName));
|
|
312
293
|
}
|
|
313
294
|
}
|
|
314
295
|
/**
|
|
@@ -379,10 +360,10 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
379
360
|
this.savePbxProj(project, projectData);
|
|
380
361
|
}
|
|
381
362
|
async prepareProject(projectData, prepareData) {
|
|
363
|
+
const platformData = this.getPlatformData(projectData);
|
|
382
364
|
const projectRoot = this.$options.hostProjectPath
|
|
383
365
|
? this.$options.hostProjectPath
|
|
384
|
-
:
|
|
385
|
-
const platformData = this.getPlatformData(projectData);
|
|
366
|
+
: platformData.projectRoot;
|
|
386
367
|
const pluginsData = this.getAllProductionPlugins(projectData);
|
|
387
368
|
const pbxProjPath = this.getPbxProjPath(projectData);
|
|
388
369
|
this.$iOSExtensionsService.removeExtensions({ pbxProjPath });
|
|
@@ -490,7 +471,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
490
471
|
}
|
|
491
472
|
}
|
|
492
473
|
}
|
|
493
|
-
this.$iOSWatchAppService.removeWatchApp({ pbxProjPath });
|
|
494
474
|
const addedWatchApp = await this.$iOSWatchAppService.addWatchAppFromPath({
|
|
495
475
|
watchAppFolderPath: path.join(resourcesDirectoryPath, platformData.normalizedPlatformName),
|
|
496
476
|
projectData,
|
|
@@ -522,13 +502,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
522
502
|
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, constants.NATIVE_EXTENSION_FOLDER));
|
|
523
503
|
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "watchapp"));
|
|
524
504
|
this.$fs.deleteDirectory(path.join(platformsAppResourcesPath, "watchextension"));
|
|
525
|
-
const macOSPlatformName = this.$devicePlatformsConstants.macOS &&
|
|
526
|
-
this.$devicePlatformsConstants.macOS.toLowerCase();
|
|
527
|
-
if (macOSPlatformName &&
|
|
528
|
-
platformData.platformNameLowerCase === macOSPlatformName) {
|
|
529
|
-
// macOS apps do not use iOS launch storyboards.
|
|
530
|
-
this.$fs.deleteFile(path.join(platformsAppResourcesPath, "LaunchScreen.storyboard"));
|
|
531
|
-
}
|
|
532
505
|
}
|
|
533
506
|
async processConfigurationFilesFromAppResources(projectData, opts) {
|
|
534
507
|
await this.mergeInfoPlists(projectData, opts);
|
|
@@ -560,9 +533,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
560
533
|
});
|
|
561
534
|
};
|
|
562
535
|
const allPlugins = this.getAllProductionPlugins(projectData);
|
|
563
|
-
const pluginPlatform = this.getPluginPlatform(projectData);
|
|
564
536
|
for (const plugin of allPlugins) {
|
|
565
|
-
const pluginInfoPlistPath = path.join(plugin.pluginPlatformsFolderPath(
|
|
537
|
+
const pluginInfoPlistPath = path.join(plugin.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME), this.getPlatformData(projectData).configurationFileName);
|
|
566
538
|
makePatch(pluginInfoPlistPath);
|
|
567
539
|
}
|
|
568
540
|
makePatch(infoPlistPath);
|
|
@@ -647,17 +619,37 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
647
619
|
return this.$fs.writeFile(this.getPbxProjPath(projectData), project.writeSync({ omitEmptyValues }));
|
|
648
620
|
}
|
|
649
621
|
async preparePluginNativeCode(pluginData, projectData, opts) {
|
|
650
|
-
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(
|
|
651
|
-
const sourcePath =
|
|
622
|
+
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME);
|
|
623
|
+
const sourcePath = path.join(pluginPlatformsFolderPath, "src");
|
|
652
624
|
await this.prepareNativeSourceCode(pluginData.name, sourcePath, projectData);
|
|
653
625
|
await this.prepareResources(pluginPlatformsFolderPath, pluginData, projectData);
|
|
654
626
|
await this.prepareFrameworks(pluginPlatformsFolderPath, pluginData, projectData);
|
|
655
627
|
await this.prepareStaticLibs(pluginPlatformsFolderPath, pluginData, projectData);
|
|
656
628
|
}
|
|
629
|
+
shouldRepreparePlugin(pluginData, projectData) {
|
|
630
|
+
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME);
|
|
631
|
+
for (const fileName of this.getAllLibsForPluginWithFileExtension(pluginData, ".a")) {
|
|
632
|
+
const staticLibPath = path.join(pluginPlatformsFolderPath, fileName);
|
|
633
|
+
const libraryName = path.basename(staticLibPath, ".a");
|
|
634
|
+
const headersSubpath = path.join(path.dirname(staticLibPath), "include", libraryName);
|
|
635
|
+
if (!this.$fs.exists(headersSubpath)) {
|
|
636
|
+
continue;
|
|
637
|
+
}
|
|
638
|
+
const headerFiles = this.$fs
|
|
639
|
+
.readDirectory(headersSubpath)
|
|
640
|
+
.filter((f) => path.extname(f) === ".h" &&
|
|
641
|
+
this.$fs.getFsStats(path.join(headersSubpath, f)).isFile());
|
|
642
|
+
if (headerFiles.length > 0 &&
|
|
643
|
+
!this.$fs.exists(path.join(headersSubpath, "module.modulemap"))) {
|
|
644
|
+
this.$logger.trace(`Plugin ${pluginData.name}: modulemap missing at ${headersSubpath}, will re-prepare`);
|
|
645
|
+
return true;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
657
650
|
async removePluginNativeCode(pluginData, projectData) {
|
|
658
|
-
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(
|
|
659
|
-
|
|
660
|
-
this.removeNativeSourceCode(sourcePath, pluginData, projectData);
|
|
651
|
+
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME);
|
|
652
|
+
this.removeNativeSourceCode(pluginPlatformsFolderPath, pluginData, projectData);
|
|
661
653
|
this.removeFrameworks(pluginPlatformsFolderPath, pluginData, projectData);
|
|
662
654
|
this.removeStaticLibs(pluginPlatformsFolderPath, pluginData, projectData);
|
|
663
655
|
const projectRoot = this.getPlatformData(projectData).projectRoot;
|
|
@@ -762,12 +754,12 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
762
754
|
], projectData.projectName, project);
|
|
763
755
|
this.savePbxProj(project, projectData);
|
|
764
756
|
}
|
|
765
|
-
getAllLibsForPluginWithFileExtension(pluginData, fileExtension
|
|
757
|
+
getAllLibsForPluginWithFileExtension(pluginData, fileExtension) {
|
|
766
758
|
const fileExtensions = _.isArray(fileExtension)
|
|
767
759
|
? fileExtension
|
|
768
760
|
: [fileExtension];
|
|
769
761
|
const filterCallback = (fileName, pluginPlatformsFolderPath) => fileExtensions.indexOf(path.extname(fileName)) !== -1;
|
|
770
|
-
return this.getAllNativeLibrariesForPlugin(pluginData,
|
|
762
|
+
return this.getAllNativeLibrariesForPlugin(pluginData, IOSProjectService.IOS_PLATFORM_NAME, filterCallback);
|
|
771
763
|
}
|
|
772
764
|
validateFramework(libraryPath) {
|
|
773
765
|
const infoPlistPath = path.join(libraryPath, constants.INFO_PLIST_FILE_NAME);
|
|
@@ -807,21 +799,6 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
807
799
|
}
|
|
808
800
|
this.savePbxProj(project, projectData);
|
|
809
801
|
}
|
|
810
|
-
getPluginNativeSourcePath(pluginData, projectData, pluginPlatformsFolderPath) {
|
|
811
|
-
const sourcePath = path.join(pluginPlatformsFolderPath, "src");
|
|
812
|
-
if (this.$fs.exists(sourcePath)) {
|
|
813
|
-
return sourcePath;
|
|
814
|
-
}
|
|
815
|
-
// For macOS only, allow reusing plugin native source code from iOS.
|
|
816
|
-
// Framework/static library discovery remains strict to `platforms/macos`.
|
|
817
|
-
if (this.$devicePlatformsConstants.ismacOS(this.getPlatformData(projectData).normalizedPlatformName)) {
|
|
818
|
-
const iosSourcePath = path.join(pluginData.pluginPlatformsFolderPath("ios" /* constants.PlatformTypes.ios */), "src");
|
|
819
|
-
if (this.$fs.exists(iosSourcePath)) {
|
|
820
|
-
return iosSourcePath;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
return sourcePath;
|
|
824
|
-
}
|
|
825
802
|
async addExtensions(projectData, pluginsData) {
|
|
826
803
|
const resorcesExtensionsPath = path.join(projectData.getAppResourcesDirectoryPath(), this.getPlatformData(projectData).normalizedPlatformName, constants.NATIVE_EXTENSION_FOLDER);
|
|
827
804
|
const platformData = this.getPlatformData(projectData);
|
|
@@ -835,7 +812,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
835
812
|
let addedExtensionsFromPlugins = false;
|
|
836
813
|
for (const pluginIndex in pluginsData) {
|
|
837
814
|
const pluginData = pluginsData[pluginIndex];
|
|
838
|
-
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(
|
|
815
|
+
const pluginPlatformsFolderPath = pluginData.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME);
|
|
839
816
|
const extensionPath = path.join(pluginPlatformsFolderPath, constants.NATIVE_EXTENSION_FOLDER);
|
|
840
817
|
const addedExtensionFromPlugin = await this.$iOSExtensionsService.addExtensionsFromPath({
|
|
841
818
|
extensionsFolderPath: extensionPath,
|
|
@@ -890,25 +867,25 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
890
867
|
this.savePbxProj(project, projectData);
|
|
891
868
|
}
|
|
892
869
|
async prepareFrameworks(pluginPlatformsFolderPath, pluginData, projectData) {
|
|
893
|
-
for (const fileName of this.getAllLibsForPluginWithFileExtension(pluginData, FRAMEWORK_EXTENSIONS
|
|
870
|
+
for (const fileName of this.getAllLibsForPluginWithFileExtension(pluginData, FRAMEWORK_EXTENSIONS)) {
|
|
894
871
|
await this.addFramework(path.join(pluginPlatformsFolderPath, fileName), projectData);
|
|
895
872
|
}
|
|
896
873
|
}
|
|
897
874
|
async prepareStaticLibs(pluginPlatformsFolderPath, pluginData, projectData) {
|
|
898
|
-
for (const fileName of this.getAllLibsForPluginWithFileExtension(pluginData, ".a"
|
|
875
|
+
for (const fileName of this.getAllLibsForPluginWithFileExtension(pluginData, ".a")) {
|
|
899
876
|
await this.addStaticLibrary(path.join(pluginPlatformsFolderPath, fileName), projectData);
|
|
900
877
|
}
|
|
901
878
|
}
|
|
902
|
-
async removeNativeSourceCode(
|
|
879
|
+
async removeNativeSourceCode(pluginPlatformsFolderPath, pluginData, projectData) {
|
|
903
880
|
const project = this.createPbxProj(projectData);
|
|
904
|
-
const group = await this.getRootGroup(pluginData.name,
|
|
881
|
+
const group = await this.getRootGroup(pluginData.name, pluginPlatformsFolderPath);
|
|
905
882
|
project.removePbxGroup(group.name, group.path);
|
|
906
883
|
project.removeFromHeaderSearchPaths(group.path);
|
|
907
884
|
this.savePbxProj(project, projectData);
|
|
908
885
|
}
|
|
909
886
|
removeFrameworks(pluginPlatformsFolderPath, pluginData, projectData) {
|
|
910
887
|
const project = this.createPbxProj(projectData);
|
|
911
|
-
_.each(this.getAllLibsForPluginWithFileExtension(pluginData, FRAMEWORK_EXTENSIONS
|
|
888
|
+
_.each(this.getAllLibsForPluginWithFileExtension(pluginData, FRAMEWORK_EXTENSIONS), (fileName) => {
|
|
912
889
|
const relativeFrameworkPath = this.getLibSubpathRelativeToProjectPath(fileName, projectData);
|
|
913
890
|
project.removeFramework(relativeFrameworkPath, {
|
|
914
891
|
customFramework: true,
|
|
@@ -919,7 +896,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
919
896
|
}
|
|
920
897
|
removeStaticLibs(pluginPlatformsFolderPath, pluginData, projectData) {
|
|
921
898
|
const project = this.createPbxProj(projectData);
|
|
922
|
-
_.each(this.getAllLibsForPluginWithFileExtension(pluginData, ".a"
|
|
899
|
+
_.each(this.getAllLibsForPluginWithFileExtension(pluginData, ".a"), (fileName) => {
|
|
923
900
|
const staticLibPath = path.join(pluginPlatformsFolderPath, fileName);
|
|
924
901
|
const relativeStaticLibPath = this.getLibSubpathRelativeToProjectPath(path.basename(staticLibPath), projectData);
|
|
925
902
|
project.removeFramework(relativeStaticLibPath);
|
|
@@ -953,9 +930,8 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
953
930
|
this.$fs.deleteFile(pluginsXcconfigFilePath);
|
|
954
931
|
}
|
|
955
932
|
const allPlugins = this.getAllProductionPlugins(projectData);
|
|
956
|
-
const pluginPlatform = this.getPluginPlatform(projectData);
|
|
957
933
|
for (const plugin of allPlugins) {
|
|
958
|
-
const pluginPlatformsFolderPath = plugin.pluginPlatformsFolderPath(
|
|
934
|
+
const pluginPlatformsFolderPath = plugin.pluginPlatformsFolderPath(IOSProjectService.IOS_PLATFORM_NAME);
|
|
959
935
|
const pluginXcconfigFilePath = path.join(pluginPlatformsFolderPath, constants_2.BUILD_XCCONFIG_FILE_NAME);
|
|
960
936
|
if (this.$fs.exists(pluginXcconfigFilePath)) {
|
|
961
937
|
for (const pluginsXcconfigFilePath of pluginsXcconfigFilePaths) {
|
|
@@ -1018,6 +994,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
|
|
|
1018
994
|
}
|
|
1019
995
|
exports.IOSProjectService = IOSProjectService;
|
|
1020
996
|
IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER = "__PROJECT_NAME__";
|
|
997
|
+
IOSProjectService.IOS_PLATFORM_NAME = "ios";
|
|
1021
998
|
__decorate([
|
|
1022
999
|
(0, helpers_2.hook)("buildIOS")
|
|
1023
1000
|
], IOSProjectService.prototype, "buildProject", null);
|