@craft-native/ios 0.0.121 → 0.0.122

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/dist/cli.js CHANGED
@@ -84,6 +84,18 @@ function renderAppearance(config) {
84
84
  return { interfaceStyle: "Light", statusBarStyle: "UIStatusBarStyleDarkContent" };
85
85
  return { interfaceStyle: "Dark", statusBarStyle: "UIStatusBarStyleLightContent" };
86
86
  }
87
+ var LINKED_PURPOSES = {
88
+ NSSpeechRecognitionUsageDescription: "speech recognition",
89
+ NSMicrophoneUsageDescription: "the microphone",
90
+ NSCameraUsageDescription: "the camera",
91
+ NSPhotoLibraryUsageDescription: "your photo library",
92
+ NSLocationWhenInUseUsageDescription: "your location",
93
+ NSContactsUsageDescription: "your contacts",
94
+ NSCalendarsUsageDescription: "your calendar",
95
+ NSBluetoothAlwaysUsageDescription: "Bluetooth",
96
+ NSMotionUsageDescription: "motion data",
97
+ NSFaceIDUsageDescription: "Face ID"
98
+ };
87
99
  function renderUsageDescriptions(config) {
88
100
  const entries = [
89
101
  [config.enableSpeechRecognition, "NSSpeechRecognitionUsageDescription", `${config.appName} uses speech recognition for voice input.`],
@@ -102,7 +114,12 @@ function renderUsageDescriptions(config) {
102
114
  [config.enableHealthKit, "NSHealthUpdateUsageDescription", `${config.appName} writes health data only with your permission.`],
103
115
  [config.enableBiometric, "NSFaceIDUsageDescription", `${config.appName} uses Face ID to protect your account.`]
104
116
  ];
105
- return entries.filter(([enabled]) => enabled).map(([, key, value]) => plistString(key, value)).join(`
117
+ return entries.map(([enabled, key, value]) => {
118
+ if (enabled)
119
+ return [key, value];
120
+ const linked = LINKED_PURPOSES[key];
121
+ return linked ? [key, `${config.appName} asks for ${linked} only in a feature that needs it.`] : null;
122
+ }).filter((entry) => entry !== null).map(([key, value]) => plistString(key, value)).join(`
106
123
  `);
107
124
  }
108
125
  function renderOrientations(config) {
package/dist/index.js CHANGED
@@ -79,6 +79,18 @@ function renderAppearance(config) {
79
79
  return { interfaceStyle: "Light", statusBarStyle: "UIStatusBarStyleDarkContent" };
80
80
  return { interfaceStyle: "Dark", statusBarStyle: "UIStatusBarStyleLightContent" };
81
81
  }
82
+ var LINKED_PURPOSES = {
83
+ NSSpeechRecognitionUsageDescription: "speech recognition",
84
+ NSMicrophoneUsageDescription: "the microphone",
85
+ NSCameraUsageDescription: "the camera",
86
+ NSPhotoLibraryUsageDescription: "your photo library",
87
+ NSLocationWhenInUseUsageDescription: "your location",
88
+ NSContactsUsageDescription: "your contacts",
89
+ NSCalendarsUsageDescription: "your calendar",
90
+ NSBluetoothAlwaysUsageDescription: "Bluetooth",
91
+ NSMotionUsageDescription: "motion data",
92
+ NSFaceIDUsageDescription: "Face ID"
93
+ };
82
94
  function renderUsageDescriptions(config) {
83
95
  const entries = [
84
96
  [config.enableSpeechRecognition, "NSSpeechRecognitionUsageDescription", `${config.appName} uses speech recognition for voice input.`],
@@ -97,7 +109,12 @@ function renderUsageDescriptions(config) {
97
109
  [config.enableHealthKit, "NSHealthUpdateUsageDescription", `${config.appName} writes health data only with your permission.`],
98
110
  [config.enableBiometric, "NSFaceIDUsageDescription", `${config.appName} uses Face ID to protect your account.`]
99
111
  ];
100
- return entries.filter(([enabled]) => enabled).map(([, key, value]) => plistString(key, value)).join(`
112
+ return entries.map(([enabled, key, value]) => {
113
+ if (enabled)
114
+ return [key, value];
115
+ const linked = LINKED_PURPOSES[key];
116
+ return linked ? [key, `${config.appName} asks for ${linked} only in a feature that needs it.`] : null;
117
+ }).filter((entry) => entry !== null).map(([key, value]) => plistString(key, value)).join(`
101
118
  `);
102
119
  }
103
120
  function renderOrientations(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/ios",
3
- "version": "0.0.121",
3
+ "version": "0.0.122",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/ios#readme",
5
5
  "repository": {
6
6
  "type": "git",