Permissions
A permission reason is the sentence iOS shows when your app first asks for something private, such as the camera or the location. Give one for each permission your app uses, in the permissions option in angular.json:
Most keys also turn on a device feature. Here, camera turns on the barcode scanner and the image picker's camera, and location turns on LynxGeolocation. See Turn on device features.
Where iOS shows it
iOS asks in a system prompt the first time the app uses the feature, such as opening the camera. The prompt shows your reason. Say what the person gets from it, as in the examples here.
The build writes each reason into the app's Info.plist as a usage description, such as NSCameraUsageDescription.
- iOS ends an app that asks without a reason for the camera, an NFC reader, the tracking prompt or saving to Photos.
- App Store Connect checks too. It flags an app whose code uses the camera, the microphone, the location, Bluetooth or the contacts without the reason (ITMS-90683).
That's why the features behind these keys are left out of your app until you give their reason.
What Android does
Android shows its own message, not your reason. The build declares the matching permissions in the app's manifest, AndroidManifest.xml.
- Some are asked for at runtime, the first time the app needs them: the camera, the microphone, the location, the contacts and Bluetooth.
- Some are granted at install, such as NFC and biometrics.
- Hardware is declared not required. Google Play still offers the app to phones without it, such as a tablet without a camera. There, the API reports that it can't.
The biometrics reason is the exception. It's also the prompt's default text, on both platforms.
Every key
Without its key, a feature's native code is left out of the app. See Without the setting.
Notes on some keys
camera: Android's barcode scanner runs in Google Play services and needs no permission. Android still declares the camera, which it asks for beforeLynxImagePickeropens the camera app.location: Android asks for both coarse and fine location, so from Android 12 the person can choose approximate. Reading the Wi-Fi network's name withwifi.readCurrentNetworkneeds it too.locationAlways: needslocationtoo. Google Play acceptsACCESS_BACKGROUND_LOCATIONonly with its background location declaration. A watch that goes on in the background doesn't need it: that's thebackgroundLocationswitch. See Follow the phone in the background.photos: Android declares nothing for it. Google Play rejects an app that asks to read the whole library without a core need for it.bluetooth: Android asks for nearby devices from Android 12, and for location before it. An app withoutbluetoothhas no Bluetooth code at all.tracking: it also adds Google Play's advertising ID library to the Android app. Android 13 and later give an app that doesn't declareAD_IDa zeroed advertising ID.nfc: a free Personal Team can't sign its entitlement. See Why some need a paid Apple team.notifications: iOS asks for notifications without a reason, so it shows none.localNetwork: for an app that connects to a printer, a TV or a server on the local network. Android needs no permission for it.
What each key writes
The camera, microphone, location, Bluetooth LE and NFC hardware are also declared with android:required="false".
Defaults
Every key is off until you set it, but two reasons have a default.
- Save Image, on iOS.
LynxShare's share sheet offers Save Image for an image, and iOS ends an app that saves without a reason. So every iOS app has one. SettingsavePhotosreplaces it, and turns onLynxPhotoLibrary.- The default reason: "Saves the images you choose to your photo library."
- The local network, in the development build. The app
ng serve --platform iosbuilds loads from your Mac, so it has a reason of its own. YourlocalNetworkreason replaces it. The app for the stores has neither, unless you set one.- The default reason: "Loads the app from ng serve on your computer while you develop it."
On Android, savePhotos needs no permission from Android 10. On Android 7 to 9, LynxPhotoLibrary asks for the storage permissions on its first save.
