vxrn 2.13.0 → 2.13.1

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.
@@ -3,7 +3,7 @@ import { createHash } from "crypto";
3
3
  import module from "module";
4
4
  import path from "path";
5
5
  import { pathToFileURL } from "url";
6
- import { androidIconSuffix, appIconPreviewResources, validateNativeApp } from "@vxrn/utils/nativeAppManifest";
6
+ import { androidIconSuffix, appIconPreviewResources, iosUsageDescriptions, validateNativeApp } from "@vxrn/utils/nativeAppManifest";
7
7
  import FSExtra from "fs-extra";
8
8
  import sharp from "sharp";
9
9
  import { swiftPackageDirectories } from "../utils/swiftPackageId.native.js";
@@ -2442,52 +2442,7 @@ ${schemes.map(function(scheme) {
2442
2442
  ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "${names}";`);
2443
2443
  }
2444
2444
  if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
2445
- var _app_imagePicker2, _app_imagePicker3, _app_ios12, _app_audio4;
2446
- var usage = /* @__PURE__ */ new Map();
2447
- if (((_app_imagePicker2 = app.imagePicker) === null || _app_imagePicker2 === void 0 ? void 0 : _app_imagePicker2.camera) !== void 0) {
2448
- usage.set("NSCameraUsageDescription", app.imagePicker.camera);
2449
- }
2450
- if (((_app_imagePicker3 = app.imagePicker) === null || _app_imagePicker3 === void 0 ? void 0 : _app_imagePicker3.microphone) !== void 0) {
2451
- usage.set("NSMicrophoneUsageDescription", app.imagePicker.microphone);
2452
- }
2453
- if (app.photoLibrary !== void 0) {
2454
- if (app.photoLibrary.addOnly !== void 0) {
2455
- usage.set("NSPhotoLibraryAddUsageDescription", app.photoLibrary.addOnly);
2456
- }
2457
- if (app.photoLibrary.readWrite !== void 0) {
2458
- usage.set("NSPhotoLibraryUsageDescription", app.photoLibrary.readWrite);
2459
- }
2460
- }
2461
- if (app.contacts !== void 0) {
2462
- usage.set("NSContactsUsageDescription", app.contacts.usage);
2463
- }
2464
- if (app.calendar !== void 0) {
2465
- if (app.calendar.usage !== void 0) {
2466
- usage.set("NSCalendarsFullAccessUsageDescription", app.calendar.usage);
2467
- }
2468
- if (app.calendar.remindersUsage !== void 0) {
2469
- usage.set("NSRemindersFullAccessUsageDescription", app.calendar.remindersUsage);
2470
- }
2471
- }
2472
- if (app.location !== void 0) {
2473
- usage.set("NSLocationWhenInUseUsageDescription", app.location.whenInUse);
2474
- if (app.location.alwaysAndWhenInUse !== void 0) {
2475
- usage.set("NSLocationAlwaysAndWhenInUseUsageDescription", app.location.alwaysAndWhenInUse);
2476
- }
2477
- }
2478
- if (app.pedometer !== void 0) {
2479
- usage.set("NSMotionUsageDescription", app.pedometer.usage);
2480
- }
2481
- if (((_app_ios12 = app.ios) === null || _app_ios12 === void 0 ? void 0 : _app_ios12.faceIdUsageDescription) !== void 0) {
2482
- usage.set("NSFaceIDUsageDescription", app.ios.faceIdUsageDescription);
2483
- }
2484
- if (app.speech !== void 0) {
2485
- usage.set("NSSpeechRecognitionUsageDescription", app.speech.recognition);
2486
- usage.set("NSMicrophoneUsageDescription", app.speech.microphone);
2487
- }
2488
- if (((_app_audio4 = app.audio) === null || _app_audio4 === void 0 ? void 0 : _app_audio4.microphone) !== void 0) {
2489
- usage.set("NSMicrophoneUsageDescription", app.audio.microphone);
2490
- }
2445
+ var usage = iosUsageDescriptions(app);
2491
2446
  var additions = [];
2492
2447
  var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
2493
2448
  try {
@@ -2532,8 +2487,8 @@ ${schemes.map(function(scheme) {
2532
2487
  rendered = rendered.replace(/\t<key>NS\w+UsageDescription<\/key>\s*<string><\/string>\n/g, "");
2533
2488
  }
2534
2489
  if (platform === "ios" && relativePath.endsWith("/AppDelegate.swift")) {
2535
- var _app_ios13, _app_ios14;
2536
- rendered = patchIosAppDelegateSceneLifecycle(rendered, !!((_app_ios13 = app.ios) === null || _app_ios13 === void 0 ? void 0 : _app_ios13.backgroundTasks), !!((_app_ios14 = app.ios) === null || _app_ios14 === void 0 ? void 0 : _app_ios14.appIntents));
2490
+ var _app_ios12, _app_ios13;
2491
+ rendered = patchIosAppDelegateSceneLifecycle(rendered, !!((_app_ios12 = app.ios) === null || _app_ios12 === void 0 ? void 0 : _app_ios12.backgroundTasks), !!((_app_ios13 = app.ios) === null || _app_ios13 === void 0 ? void 0 : _app_ios13.appIntents));
2537
2492
  rendered = nativeProjectPatches.holdLaunchScreenOverRootView(rendered);
2538
2493
  var bundleURLProvider = "RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")";
2539
2494
  if (!rendered.includes(bundleURLProvider)) {
@@ -2550,8 +2505,8 @@ ${schemes.map(function(scheme) {
2550
2505
  }
2551
2506
  if (platform === "ios") {
2552
2507
  var _ref5;
2553
- var _app_ios15;
2554
- var deploymentTarget = (_ref5 = (_app_ios15 = app.ios) === null || _app_ios15 === void 0 ? void 0 : _app_ios15.deploymentTarget) !== null && _ref5 !== void 0 ? _ref5 : "17.0";
2508
+ var _app_ios14;
2509
+ var deploymentTarget = (_ref5 = (_app_ios14 = app.ios) === null || _app_ios14 === void 0 ? void 0 : _app_ios14.deploymentTarget) !== null && _ref5 !== void 0 ? _ref5 : "17.0";
2555
2510
  rendered = rendered.replace("platform :ios, min_ios_version_supported", `platform :ios, '${deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \d+(?:\.\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${deploymentTarget};`);
2556
2511
  if (relativePath === "Podfile") {
2557
2512
  rendered = rendered.replace(" )\n end\nend", ` )
@@ -2566,27 +2521,27 @@ end`);
2566
2521
  }
2567
2522
  }
2568
2523
  if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
2569
- var _app_updates, _app_ios16, _app_ios17, _app_ios18;
2524
+ var _app_updates, _app_ios15, _app_ios16, _app_ios17;
2570
2525
  rendered = patchIosBundlePhase(rendered, (_app_updates = app.updates) === null || _app_updates === void 0 ? void 0 : _app_updates.runtimeVersion);
2571
- if ((_app_ios16 = app.ios) === null || _app_ios16 === void 0 ? void 0 : _app_ios16.appIntents) rendered = patchIosPbxprojAppIntents(rendered, appName);
2526
+ if ((_app_ios15 = app.ios) === null || _app_ios15 === void 0 ? void 0 : _app_ios15.appIntents) rendered = patchIosPbxprojAppIntents(rendered, appName);
2572
2527
  rendered = patchIosPbxprojOneBridgingHeader(rendered, appName);
2573
- if (Object.keys(appEntitlements(app)).length && !((_app_ios17 = app.ios) === null || _app_ios17 === void 0 ? void 0 : _app_ios17.widgets)) {
2528
+ if (Object.keys(appEntitlements(app)).length && !((_app_ios16 = app.ios) === null || _app_ios16 === void 0 ? void 0 : _app_ios16.widgets)) {
2574
2529
  rendered = patchIosPbxprojAppEntitlements(rendered, appName);
2575
2530
  }
2576
- if ((_app_ios18 = app.ios) === null || _app_ios18 === void 0 ? void 0 : _app_ios18.widgets) rendered = patchIosPbxprojWidgets(rendered, app);
2531
+ if ((_app_ios17 = app.ios) === null || _app_ios17 === void 0 ? void 0 : _app_ios17.widgets) rendered = patchIosPbxprojWidgets(rendered, app);
2577
2532
  if (iosResourceFiles(app).length) {
2578
2533
  rendered = patchIosPbxprojResources(rendered, appName, iosResourceFiles(app));
2579
2534
  }
2580
2535
  }
2581
2536
  if (platform === "ios" && relativePath === "Podfile") {
2582
- var _app_ios19, _app_ios20, _app_ios21;
2583
- if ((_app_ios19 = app.ios) === null || _app_ios19 === void 0 ? void 0 : _app_ios19.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'
2537
+ var _app_ios18, _app_ios19, _app_ios20;
2538
+ if ((_app_ios18 = app.ios) === null || _app_ios18 === void 0 ? void 0 : _app_ios18.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'
2584
2539
  ${rendered}`;
2585
- if ((_app_ios20 = app.ios) === null || _app_ios20 === void 0 ? void 0 : _app_ios20.useFrameworks) {
2540
+ if ((_app_ios19 = app.ios) === null || _app_ios19 === void 0 ? void 0 : _app_ios19.useFrameworks) {
2586
2541
  rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1
2587
2542
  use_frameworks! :linkage => :${app.ios.useFrameworks}`);
2588
2543
  }
2589
- if ((_app_ios21 = app.ios) === null || _app_ios21 === void 0 ? void 0 : _app_ios21.screensGamma) {
2544
+ if ((_app_ios20 = app.ios) === null || _app_ios20 === void 0 ? void 0 : _app_ios20.screensGamma) {
2590
2545
  rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);
2591
2546
  }
2592
2547
  rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);