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.
Files changed (267) hide show
  1. package/README.md +49 -0
  2. package/config/test-deps-versions-generated.json +3 -3
  3. package/lib/.d.ts +1 -0
  4. package/lib/bootstrap.js +0 -2
  5. package/lib/commands/build.js +1 -30
  6. package/lib/commands/prepare.js +5 -0
  7. package/lib/commands/run.js +1 -39
  8. package/lib/commands/widget.js +1 -2
  9. package/lib/common/definitions/mobile.d.ts +15 -13
  10. package/lib/common/file-system.js +11 -15
  11. package/lib/common/mobile/android/android-emulator-services.js +11 -3
  12. package/lib/common/mobile/device-platforms-constants.js +0 -4
  13. package/lib/common/mobile/emulator-helper.js +1 -0
  14. package/lib/common/mobile/ios/device/ios-device-file-system.js +29 -1
  15. package/lib/common/mobile/mobile-helper.js +1 -12
  16. package/lib/constants.js +7 -2
  17. package/lib/controllers/prepare-controller.js +53 -39
  18. package/lib/controllers/run-controller.js +200 -13
  19. package/lib/data/prepare-data.js +4 -0
  20. package/lib/declarations.d.ts +38 -42
  21. package/lib/definitions/nativescript-dev-xcode.d.ts +25 -1
  22. package/lib/definitions/project.d.ts +51 -6
  23. package/lib/key-commands/bootstrap.js +0 -1
  24. package/lib/key-commands/index.js +1 -53
  25. package/lib/options.js +1 -0
  26. package/lib/project-data.js +0 -6
  27. package/lib/services/android-plugin-build-service.js +20 -12
  28. package/lib/services/bundler/bundler-compiler-service.js +182 -13
  29. package/lib/services/debug-service-base.js +1 -1
  30. package/lib/services/ios/ios-signing-service.js +10 -3
  31. package/lib/services/ios/spm-service.js +1 -8
  32. package/lib/services/ios/xcodebuild-args-service.js +36 -29
  33. package/lib/services/ios-entitlements-service.js +3 -1
  34. package/lib/services/ios-project-service.js +55 -78
  35. package/lib/services/ios-watch-app-service.js +663 -16
  36. package/lib/services/livesync/ios-livesync-service.js +113 -2
  37. package/lib/services/platforms-data-service.js +0 -1
  38. package/lib/services/plugins-service.js +16 -28
  39. package/lib/services/project-changes-service.js +4 -15
  40. package/lib/services/project-data-service.js +16 -31
  41. package/lib/services/versions-service.js +0 -4
  42. package/lib/tools/config-manipulation/config-transformer.js +55 -3
  43. package/node_modules/debug/LICENSE +20 -0
  44. package/node_modules/debug/README.md +481 -0
  45. package/node_modules/debug/package.json +64 -0
  46. package/node_modules/debug/src/browser.js +272 -0
  47. package/node_modules/debug/src/common.js +292 -0
  48. package/node_modules/debug/src/index.js +10 -0
  49. package/node_modules/debug/src/node.js +263 -0
  50. package/node_modules/ms/index.js +162 -0
  51. package/node_modules/ms/license.md +21 -0
  52. package/node_modules/ms/package.json +38 -0
  53. package/node_modules/ms/readme.md +59 -0
  54. package/node_modules/universal-analytics/.travis.yml +11 -0
  55. package/node_modules/universal-analytics/AcceptableParams.md +757 -0
  56. package/node_modules/universal-analytics/HISTORY.md +170 -0
  57. package/node_modules/universal-analytics/Makefile +5 -0
  58. package/node_modules/universal-analytics/README.md +651 -0
  59. package/node_modules/universal-analytics/index.js +2 -0
  60. package/node_modules/universal-analytics/lib/config.js +171 -0
  61. package/node_modules/universal-analytics/lib/index.js +563 -0
  62. package/node_modules/universal-analytics/lib/request.js +73 -0
  63. package/node_modules/universal-analytics/lib/utils.js +29 -0
  64. package/node_modules/universal-analytics/package.json +33 -0
  65. package/node_modules/universal-analytics/test/_enqueue.js +144 -0
  66. package/node_modules/universal-analytics/test/event.js +346 -0
  67. package/node_modules/universal-analytics/test/exception.js +233 -0
  68. package/node_modules/universal-analytics/test/index.js +141 -0
  69. package/node_modules/universal-analytics/test/item.js +550 -0
  70. package/node_modules/universal-analytics/test/middleware.js +119 -0
  71. package/node_modules/universal-analytics/test/mocha.opts +3 -0
  72. package/node_modules/universal-analytics/test/pageview.js +286 -0
  73. package/node_modules/universal-analytics/test/send.js +232 -0
  74. package/node_modules/universal-analytics/test/set.js +68 -0
  75. package/node_modules/universal-analytics/test/timing.js +363 -0
  76. package/node_modules/universal-analytics/test/transaction.js +371 -0
  77. package/node_modules/uuid/LICENSE.md +9 -0
  78. package/node_modules/uuid/README.md +510 -0
  79. package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  80. package/node_modules/uuid/dist/cjs/index.js +31 -0
  81. package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  82. package/node_modules/uuid/dist/cjs/max.js +3 -0
  83. package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
  84. package/node_modules/uuid/dist/cjs/md5.js +13 -0
  85. package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
  86. package/node_modules/uuid/dist/cjs/native.js +4 -0
  87. package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  88. package/node_modules/uuid/dist/cjs/nil.js +3 -0
  89. package/node_modules/uuid/dist/cjs/package.json +1 -0
  90. package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  91. package/node_modules/uuid/dist/cjs/parse.js +11 -0
  92. package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  93. package/node_modules/uuid/dist/cjs/regex.js +3 -0
  94. package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  95. package/node_modules/uuid/dist/cjs/rng.js +13 -0
  96. package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
  97. package/node_modules/uuid/dist/cjs/sha1.js +13 -0
  98. package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  99. package/node_modules/uuid/dist/cjs/stringify.js +39 -0
  100. package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  101. package/node_modules/uuid/dist/cjs/types.js +2 -0
  102. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  103. package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  104. package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  105. package/node_modules/uuid/dist/cjs/v1.js +87 -0
  106. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  107. package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  108. package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  109. package/node_modules/uuid/dist/cjs/v3.js +14 -0
  110. package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  111. package/node_modules/uuid/dist/cjs/v35.js +41 -0
  112. package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  113. package/node_modules/uuid/dist/cjs/v4.js +29 -0
  114. package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  115. package/node_modules/uuid/dist/cjs/v5.js +14 -0
  116. package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  117. package/node_modules/uuid/dist/cjs/v6.js +19 -0
  118. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  119. package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  120. package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  121. package/node_modules/uuid/dist/cjs/v7.js +69 -0
  122. package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  123. package/node_modules/uuid/dist/cjs/validate.js +7 -0
  124. package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  125. package/node_modules/uuid/dist/cjs/version.js +10 -0
  126. package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  127. package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  128. package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  129. package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  130. package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  131. package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  132. package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  133. package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  134. package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  135. package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  136. package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  137. package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  138. package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  139. package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  140. package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  141. package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  142. package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  143. package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  144. package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  145. package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  146. package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
  147. package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  148. package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  149. package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  150. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  151. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  152. package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
  153. package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  154. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  155. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  156. package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  157. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  158. package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
  159. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  160. package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
  161. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  162. package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  163. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  164. package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
  165. package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  166. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  167. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  168. package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
  169. package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  170. package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  171. package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  172. package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  173. package/node_modules/uuid/dist/esm/bin/uuid +2 -0
  174. package/node_modules/uuid/dist/esm/index.d.ts +15 -0
  175. package/node_modules/uuid/dist/esm/index.js +14 -0
  176. package/node_modules/uuid/dist/esm/max.d.ts +2 -0
  177. package/node_modules/uuid/dist/esm/max.js +1 -0
  178. package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
  179. package/node_modules/uuid/dist/esm/md5.js +11 -0
  180. package/node_modules/uuid/dist/esm/native.d.ts +6 -0
  181. package/node_modules/uuid/dist/esm/native.js +2 -0
  182. package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  183. package/node_modules/uuid/dist/esm/nil.js +1 -0
  184. package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  185. package/node_modules/uuid/dist/esm/parse.js +9 -0
  186. package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  187. package/node_modules/uuid/dist/esm/regex.js +1 -0
  188. package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  189. package/node_modules/uuid/dist/esm/rng.js +10 -0
  190. package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
  191. package/node_modules/uuid/dist/esm/sha1.js +11 -0
  192. package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  193. package/node_modules/uuid/dist/esm/stringify.js +35 -0
  194. package/node_modules/uuid/dist/esm/types.d.ts +21 -0
  195. package/node_modules/uuid/dist/esm/types.js +1 -0
  196. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  197. package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  198. package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  199. package/node_modules/uuid/dist/esm/v1.js +83 -0
  200. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  201. package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  202. package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  203. package/node_modules/uuid/dist/esm/v3.js +9 -0
  204. package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  205. package/node_modules/uuid/dist/esm/v35.js +36 -0
  206. package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  207. package/node_modules/uuid/dist/esm/v4.js +27 -0
  208. package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  209. package/node_modules/uuid/dist/esm/v5.js +9 -0
  210. package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  211. package/node_modules/uuid/dist/esm/v6.js +17 -0
  212. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  213. package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  214. package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  215. package/node_modules/uuid/dist/esm/v7.js +65 -0
  216. package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  217. package/node_modules/uuid/dist/esm/validate.js +5 -0
  218. package/node_modules/uuid/dist/esm/version.d.ts +2 -0
  219. package/node_modules/uuid/dist/esm/version.js +8 -0
  220. package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  221. package/node_modules/uuid/dist/esm-browser/index.js +14 -0
  222. package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  223. package/node_modules/uuid/dist/esm-browser/max.js +1 -0
  224. package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  225. package/node_modules/uuid/dist/esm-browser/md5.js +135 -0
  226. package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  227. package/node_modules/uuid/dist/esm-browser/native.js +2 -0
  228. package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  229. package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  230. package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  231. package/node_modules/uuid/dist/esm-browser/parse.js +9 -0
  232. package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  233. package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  234. package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  235. package/node_modules/uuid/dist/esm-browser/rng.js +11 -0
  236. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  237. package/node_modules/uuid/dist/esm-browser/sha1.js +70 -0
  238. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  239. package/node_modules/uuid/dist/esm-browser/stringify.js +35 -0
  240. package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  241. package/node_modules/uuid/dist/esm-browser/types.js +1 -0
  242. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  243. package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  244. package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  245. package/node_modules/uuid/dist/esm-browser/v1.js +83 -0
  246. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  247. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
  248. package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  249. package/node_modules/uuid/dist/esm-browser/v3.js +9 -0
  250. package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  251. package/node_modules/uuid/dist/esm-browser/v35.js +36 -0
  252. package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  253. package/node_modules/uuid/dist/esm-browser/v4.js +27 -0
  254. package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  255. package/node_modules/uuid/dist/esm-browser/v5.js +9 -0
  256. package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  257. package/node_modules/uuid/dist/esm-browser/v6.js +17 -0
  258. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  259. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
  260. package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  261. package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
  262. package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  263. package/node_modules/uuid/dist/esm-browser/validate.js +5 -0
  264. package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  265. package/node_modules/uuid/dist/esm-browser/version.js +8 -0
  266. package/node_modules/uuid/package.json +132 -0
  267. 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.MacOSPlatformSdkName = exports.VisionSimulatorPlatformSdkName = exports.VisionDevicePlatformSdkName = exports.SimulatorPlatformSdkName = exports.DevicePlatformSdkName = void 0;
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
- const platform = this.$mobileHelper.normalizePlatformName((_a = this.$options.platformOverride) !== null && _a !== void 0 ? _a : this.$devicePlatformsConstants.iOS);
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 (bundlePath, frameworkName) => {
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
- isDynamic = await isDynamicFrameworkBundle(singlePlatformFramework, frameworkName);
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
- : path.join(projectData.platformsDir, this.$devicePlatformsConstants.iOS.toLowerCase());
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(pluginPlatform), this.getPlatformData(projectData).configurationFileName);
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(this.getPluginPlatform(projectData));
651
- const sourcePath = this.getPluginNativeSourcePath(pluginData, projectData, pluginPlatformsFolderPath);
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(this.getPluginPlatform(projectData));
659
- const sourcePath = this.getPluginNativeSourcePath(pluginData, projectData, pluginPlatformsFolderPath);
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, projectData) {
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, this.getPluginPlatform(projectData), filterCallback);
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(this.getPluginPlatform(projectData));
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, projectData)) {
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", projectData)) {
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(sourceFolderPath, pluginData, projectData) {
879
+ async removeNativeSourceCode(pluginPlatformsFolderPath, pluginData, projectData) {
903
880
  const project = this.createPbxProj(projectData);
904
- const group = await this.getRootGroup(pluginData.name, sourceFolderPath);
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, projectData), (fileName) => {
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", projectData), (fileName) => {
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(pluginPlatform);
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);