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 "node:crypto";
3
3
  import module from "node:module";
4
4
  import path from "node:path";
5
5
  import { pathToFileURL } from "node: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.mjs";
@@ -2005,51 +2005,7 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
2005
2005
  ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "${names}";`);
2006
2006
  }
2007
2007
  if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
2008
- const usage = /* @__PURE__ */ new Map();
2009
- if (app.imagePicker?.camera !== void 0) {
2010
- usage.set("NSCameraUsageDescription", app.imagePicker.camera);
2011
- }
2012
- if (app.imagePicker?.microphone !== void 0) {
2013
- usage.set("NSMicrophoneUsageDescription", app.imagePicker.microphone);
2014
- }
2015
- if (app.photoLibrary !== void 0) {
2016
- if (app.photoLibrary.addOnly !== void 0) {
2017
- usage.set("NSPhotoLibraryAddUsageDescription", app.photoLibrary.addOnly);
2018
- }
2019
- if (app.photoLibrary.readWrite !== void 0) {
2020
- usage.set("NSPhotoLibraryUsageDescription", app.photoLibrary.readWrite);
2021
- }
2022
- }
2023
- if (app.contacts !== void 0) {
2024
- usage.set("NSContactsUsageDescription", app.contacts.usage);
2025
- }
2026
- if (app.calendar !== void 0) {
2027
- if (app.calendar.usage !== void 0) {
2028
- usage.set("NSCalendarsFullAccessUsageDescription", app.calendar.usage);
2029
- }
2030
- if (app.calendar.remindersUsage !== void 0) {
2031
- usage.set("NSRemindersFullAccessUsageDescription", app.calendar.remindersUsage);
2032
- }
2033
- }
2034
- if (app.location !== void 0) {
2035
- usage.set("NSLocationWhenInUseUsageDescription", app.location.whenInUse);
2036
- if (app.location.alwaysAndWhenInUse !== void 0) {
2037
- usage.set("NSLocationAlwaysAndWhenInUseUsageDescription", app.location.alwaysAndWhenInUse);
2038
- }
2039
- }
2040
- if (app.pedometer !== void 0) {
2041
- usage.set("NSMotionUsageDescription", app.pedometer.usage);
2042
- }
2043
- if (app.ios?.faceIdUsageDescription !== void 0) {
2044
- usage.set("NSFaceIDUsageDescription", app.ios.faceIdUsageDescription);
2045
- }
2046
- if (app.speech !== void 0) {
2047
- usage.set("NSSpeechRecognitionUsageDescription", app.speech.recognition);
2048
- usage.set("NSMicrophoneUsageDescription", app.speech.microphone);
2049
- }
2050
- if (app.audio?.microphone !== void 0) {
2051
- usage.set("NSMicrophoneUsageDescription", app.audio.microphone);
2052
- }
2008
+ const usage = iosUsageDescriptions(app);
2053
2009
  const additions = [];
2054
2010
  for (const [key, text] of usage) {
2055
2011
  const existing = new RegExp(`(<key>${key}</key>\\s*<string>)[^<]*(</string>)`);