> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 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:

```json title="angular.json"
"options": {
  "permissions": {
    "camera": "Scan receipts",
    "location": "Shows the shops near you"
  }
}
```

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](/guide/native-apps/device-features.md).

## 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**](/guide/glossary.md#infoplist) 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**](/guide/glossary.md#android-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

| Key              | What it's for                                                    | Turns on                                                                                                                                                                             |
| ---------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `camera`         | Taking photos and scanning codes                                 | [`LynxBarcodeScanner`](/api/angular-lynx/hardware/barcode-scanner.md), [`LynxImagePicker`](/guide/image-picker.md#take-a-photo-with-the-camera)'s camera                             |
| `microphone`     | Recording audio                                                  | [`LynxAudioRecorder`](/api/angular-lynx/hardware/audio-recorder.md)                                                                                                                  |
| `location`       | Finding the phone while the app is in use                        | [`LynxGeolocation`](/api/angular-lynx/hardware/geolocation.md)                                                                                                                       |
| `locationAlways` | Finding the phone while the app isn't in use, for areas          | `LynxGeolocation`'s [`always`](/api/angular-lynx/hardware/geolocation.md#always) and [`watchRegion()`](/api/angular-lynx/hardware/geolocation.md#hear-when-the-phone-enters-an-area) |
| `photos`         | Reading the photo library, on iOS only                           | Nothing. `LynxImagePicker` and `LynxPhotoLibrary` don't need it                                                                                                                      |
| `savePhotos`     | Adding images and videos to the photo library                    | [`LynxPhotoLibrary`](/api/angular-lynx/media/photo-library.md)                                                                                                                       |
| `contacts`       | Reading the address book                                         | [`LynxContacts`](/api/angular-lynx/media/contacts.md)`.getAll()`. Picking a contact needs no permission                                                                              |
| `notifications`  | Showing notifications                                            | Nothing. It declares Android's permission                                                                                                                                            |
| `localNetwork`   | Connecting to devices or servers on the local network            | Nothing. iOS 14 and later ask first                                                                                                                                                  |
| `biometrics`     | Face ID, Touch ID or a fingerprint                               | [`LynxBiometrics`](/api/angular-lynx/hardware/biometrics.md), and `LynxSecureStorage`'s `requireBiometrics`                                                                          |
| `bluetooth`      | Connecting to Bluetooth LE devices                               | [`LynxBluetooth`](/api/angular-lynx/hardware/bluetooth.md)                                                                                                                           |
| `tracking`       | The tracking prompt an app with ads or install attribution needs | [`LynxTracking`](/api/angular-lynx/accounts/tracking.md)                                                                                                                             |
| `nfc`            | Reading and writing NFC tags                                     | [`LynxNfc`](/api/angular-lynx/hardware/nfc.md), and iOS's NFC Tag Reading [entitlement](/guide/glossary.md#entitlement)                                                              |

Without its key, a feature's native code is left out of the app. See [Without the setting](/guide/native-apps/device-features.md#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 before `LynxImagePicker` opens 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 with `wifi.readCurrentNetwork` needs it too.
- **`locationAlways`:** needs `location` too. Google Play accepts `ACCESS_BACKGROUND_LOCATION` only with its background location declaration. A watch that goes on in the background doesn't need it: that's the `backgroundLocation` switch. See [Follow the phone in the background](/api/angular-lynx/hardware/geolocation.md#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 without `bluetooth` has 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 declare `AD_ID` a zeroed advertising ID.
- **`nfc`:** a free Personal Team can't sign its entitlement. See [Why some need a paid Apple team](/guide/native-apps/device-features.md#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.

:::details What each key writes
The camera, microphone, location, Bluetooth LE and NFC hardware are also declared with `android:required="false"`.

| Key              | iOS (Info.plist)                               | Android (manifest)                                                                                                 |
| ---------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `camera`         | `NSCameraUsageDescription`                     | `CAMERA`                                                                                                           |
| `microphone`     | `NSMicrophoneUsageDescription`                 | `RECORD_AUDIO`                                                                                                     |
| `location`       | `NSLocationWhenInUseUsageDescription`          | `ACCESS_COARSE_LOCATION`, `ACCESS_FINE_LOCATION`                                                                   |
| `locationAlways` | `NSLocationAlwaysAndWhenInUseUsageDescription` | `ACCESS_BACKGROUND_LOCATION`                                                                                       |
| `photos`         | `NSPhotoLibraryUsageDescription`               | None                                                                                                               |
| `savePhotos`     | `NSPhotoLibraryAddUsageDescription`            | `READ_EXTERNAL_STORAGE` and `WRITE_EXTERNAL_STORAGE`, up to Android 9                                              |
| `contacts`       | `NSContactsUsageDescription`                   | `READ_CONTACTS`                                                                                                    |
| `notifications`  | None                                           | `POST_NOTIFICATIONS`                                                                                               |
| `localNetwork`   | `NSLocalNetworkUsageDescription`               | None                                                                                                               |
| `biometrics`     | `NSFaceIDUsageDescription`                     | `USE_BIOMETRIC`                                                                                                    |
| `bluetooth`      | `NSBluetoothAlwaysUsageDescription`            | `BLUETOOTH_SCAN`, `BLUETOOTH_CONNECT`, and up to Android 11 `BLUETOOTH`, `BLUETOOTH_ADMIN`, `ACCESS_FINE_LOCATION` |
| `tracking`       | `NSUserTrackingUsageDescription`               | `com.google.android.gms.permission.AD_ID`                                                                          |
| `nfc`            | `NFCReaderUsageDescription`                    | `NFC`                                                                                                              |

:::

## 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. Setting `savePhotos` replaces it, and turns on `LynxPhotoLibrary`.
  - The default reason: "Saves the images you choose to your photo library."
- **The local network, in the development build.** The app `ng serve --platform ios` builds loads from your Mac, so it has a reason of its own. Your `localNetwork` reason 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.

## Related

- [Turn on device features](/guide/native-apps/device-features.md)
- [Native app options](/api/build/index.md#native-app-options)
- [Publish to the app stores](/guide/publishing.md)
