# Info.plist options

If you have an iOS app (including Flutter or React Native) or a watchOS app, then the following additional `Info.plist` options are available.

## **APLLogging**

To enable debug logging in the Appfigurate library early on, add the `APLLogging` key to the `Info.plist` file. The `APLLogging` key is optional.

> `Info.plist` example

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>APLLogging</key>
     <true/>
     ...
```

The default value of `APLLogging` is false. You should not need to enable this to true unless you are having trouble integrating the library. It is best practice not to ship an app with this key set to true.

You can also call [<mark style="color:blue;">`APLSetLogging`</mark>](https://www.electricbolt.co.nz/api/Functions.html#/c:@F@APLSetLogging) function to achieve the same result in code.

## **Keychain accessibility**

Appfigurate Library stores any configuration payload and digital signature (that may have been applied by Appfigurate) securely in your app's Keychain.

The `APLKeychainAccessibility` key affects the access level of that configuration payload and digital signature. Best practice is to use the most restrictive option that is compatible with your app (and app extensions). The `APLKeychainAccessibility` key is optional.

| Value                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `WhenUnlocked`                   | Configuration can only be accessed while the device is unlocked. Will migrate to a new device when restored from an encrypted backup.                                                                                                                                                                                                                                                                                        |
| `AfterFirstUnlock`               | Configuration can only be accessed once the device has been unlocked after a restart. Will migrate to a new device when restored from an encrypted backup.                                                                                                                                                                                                                                                                   |
| ~~`Always`~~                     | <p>Configuration can always be accessed regardless of the lock state of the device. Will migrate to a new device when restored from an encrypted backup.</p><p></p><p><strong>Deprecated</strong> for general apps, use an accessibility level that provides some user protection, such as <code>WhenUnlocked</code>. <strong>Acceptable</strong> for VoIP apps that can be launched before the user unlocks the device.</p> |
| `WhenPasscodeSetThisDeviceOnly`  | Configuration can only be accessed while the device is unlocked.                                                                                                                                                                                                                                                                                                                                                             |
| `WhenUnlockedThisDeviceOnly`     | Configuration can only be accessed while the device is unlocked.                                                                                                                                                                                                                                                                                                                                                             |
| `AfterFirstUnlockThisDeviceOnly` | Configuration can only be accessed once the device has been unlocked after a restart.                                                                                                                                                                                                                                                                                                                                        |
| ~~`AlwaysThisDeviceOnly`~~       | <p>Configuration can always be accessed regardless of the lock state of the device. </p><p></p><p><strong>Deprecated</strong> for general apps, use an accessibility level that provides some user protection, such as <code>WhenUnlockedThisDeviceOnly</code>. </p><p><strong>Acceptable</strong> for VoIP apps which can be launched before the user unlocks the device.</p>                                               |

> `Info.plist` example

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>APLKeychainAccessibility</key>
     <string>AfterFirstUnlock</string>
     ...
```

The default value of `APLKeychainAccessibility` is `Always`.

## Info.plist key availability by platform

<table><thead><tr><th width="288">Key</th><th>iOS app</th><th>iOS app extension</th><th>watchOS app</th><th>watchOS app extension</th></tr></thead><tbody><tr><td><code>APLLogging</code></td><td>✓</td><td>1</td><td>✓</td><td>2</td></tr><tr><td><code>APLKeychainAccessibility</code></td><td>✓</td><td>1</td><td>✓</td><td>2</td></tr><tr><td><code>APLKeychainAccessGroup</code></td><td>✓</td><td>1</td><td>✓</td><td>2</td></tr></tbody></table>

1=iOS app extensions automatically use the `Info.plist` file from the containing app. You do not need to modify the iOS app extension's `Info.plist` file.

2=watchOS app extensions automatically use the `Info.plist` file from the containing watch app. You do not need to modify the watchOS app extension's `Info.plist` file.

## Standard Info.plist behaviour

### App name

The standard key `CFBundleDisplayName` (if specified) will be used to populate the name of the app in Appfigurate. If not specified, then the `CFBundleName` value is used.

### App version

The standard key `CFBundleShortVersionString` (if specified) will be used to populate the version of the app in Appfigurate. If not specified, then the `CFBundleVersion` value is used.

### App icon

To populate the icon of the app in Appfigurate, the following search order is used: `CFBundleIcons`,`CFBundleIconFiles`,`CFBundleIconFile`.

For iOS, the search order of app icon sizes is: 60x60\@2x, 60x60\@3x, 76x76\@2x, 83.5x83.5\@2x, 60x60\@1x, 76x76\@1x

For watchOS, the search order of app icon sizes is: 40x40\@2x
