Add permissions and native config
Android permissions come from the SDK; iOS usage descriptions go in Info.plist or app.json.
| What | Android | iOS |
|---|---|---|
| permissions an SDK method needs | added for you, from the SDK's @RequiresPermission | an Info.plist usage description, which you add |
| other permissions and entries | the app's AndroidManifest.xml | the app's Info.plist |
| asking at run time | requestPermissions from lucent:android, or PermissionsAndroid in JavaScript | the SDK from Lucent, such as requestWhenInUseAuthorization |
Android
Section titled “Android”When a module calls a method the SDK marks with @RequiresPermission, lucent build adds that permission to the native package's manifest. Android merges it into the app's. Location, network state, vibration and biometrics work this way.
{ "expo": { "ios": { "infoPlist": { "NSLocationWhenInUseUsageDescription": "Shows where you are on the map." } } }}<key>NSLocationWhenInUseUsageDescription</key><string>Shows where you are on the map.</string>Rebuild the app after changing either file. iOS shows a permission prompt only when the app gives the reason for it.