vxrn 2.0.0-beta.135.1 → 2.0.0-beta.136.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.
@@ -1407,8 +1407,12 @@ ${schemes.map((scheme) => ` <string>${scheme}</string>`).join("\n")}
1407
1407
  if (app.ios?.widgets) {
1408
1408
  stamps.push(" <key>NSSupportsLiveActivities</key>\n <true/>");
1409
1409
  }
1410
- if (app.pictureInPicture || app.audio?.background) {
1411
- stamps.push(" <key>UIBackgroundModes</key>\n <array>\n <string>audio</string>\n </array>");
1410
+ const backgroundModes = [...app.pictureInPicture || app.audio?.background ? ["audio"] : [], ...app.location?.background ? ["location"] : []];
1411
+ if (backgroundModes.length) {
1412
+ stamps.push(` <key>UIBackgroundModes</key>
1413
+ <array>
1414
+ ${backgroundModes.map((mode) => ` <string>${mode}</string>`).join("\n")}
1415
+ </array>`);
1412
1416
  }
1413
1417
  if (app.updates !== void 0) {
1414
1418
  if (app.updates.url !== void 0) {
@@ -1621,7 +1625,12 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
1621
1625
  usage.set("NSCameraUsageDescription", app.imagePicker.camera);
1622
1626
  }
1623
1627
  if (app.photoLibrary !== void 0) {
1624
- usage.set("NSPhotoLibraryAddUsageDescription", app.photoLibrary.addOnly);
1628
+ if (app.photoLibrary.addOnly !== void 0) {
1629
+ usage.set("NSPhotoLibraryAddUsageDescription", app.photoLibrary.addOnly);
1630
+ }
1631
+ if (app.photoLibrary.readWrite !== void 0) {
1632
+ usage.set("NSPhotoLibraryUsageDescription", app.photoLibrary.readWrite);
1633
+ }
1625
1634
  }
1626
1635
  if (app.contacts !== void 0) {
1627
1636
  usage.set("NSContactsUsageDescription", app.contacts.usage);
@@ -1665,6 +1674,7 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
1665
1674
  <string>${escapeXml(text)}</string>
1666
1675
  `).join("")}${anchor}`);
1667
1676
  }
1677
+ rendered = rendered.replace(/\t<key>NS\w+UsageDescription<\/key>\s*<string><\/string>\n/g, "");
1668
1678
  rendered = patchIosInfoPlistSceneManifest(rendered);
1669
1679
  }
1670
1680
  if (platform === "ios" && relativePath.endsWith("/AppDelegate.swift")) {