Edit appinfo

The appinfo.json configuration file contains information defining the operation of your app, stored as key-value pairs. Many of the properties defined in the file are controlled in ArcGIS AppStudio, but there are cases in which you need to add items to it manually.

The appinfo.json file resides in your app's main folder. To access it, click the Files button for your app in ArcGIS AppStudio.

Usage description keys

A common case for editing the appinfo.json file directly is to add usage description keys. These are short strings that describe why your app is requesting to use functionality such as the camera, background location capture, or Bluetooth. This is a requirement for iOS and macOS devices and cannot currently be used on other platforms. While this is intended to be implemented as a user interface item in the future, it currently must be added manually.

Individual usage descriptions must be added under the usageDescriptionKeys heading. This section can be inserted into the appinfo.json file at any time. The order of the values makes no difference to functionality. While there is no harm in including descriptions for all capabilities, even those not supported by the app, unnecessary description strings are not included in the app building process. In the following code sample, bluetoothUsageDescription would not be used, because the app doesn't include Bluetooth functionality.

"capabilities": {
    "audio": false,    
    "bluetooth": false,
    "camera": true,
    "backgroundModes": {
        "location": {
            "enabled": true
        }
    },
    "location": true,
    "microphone": true,
    "network": true,
    "storage": true
},
"usageDescriptionKeys": {
    "bluetoothUsageDescription": "This app uses Bluetooth to scan and connect to devices. (iOS only)",
    "cameraUsageDescription": "This app needs access to the camera to take a picture. (iOS only)",
    "faceIDUsageDescription": "This app uses face ID to authenticate using facial recognition. (iOS only)",
    "locationAlwaysUsageDescription": "This app needs access to device location when the app is running or in the background. (iOS and macOS)",
    "locationWhenInUseUsageDescription": "This app needs access to device location when the app is running. (iOS and macOS)",
    "microphoneUsageDescription": "This app needs access to a microphone to record audio. (iOS only)",
    "photoLibraryUsageDescription": "This app needs access to the photo library to select a photo. (iOS only)",
    "photoLibraryAddUsageDescription": "This app uses your photo library to save photos in the camera roll for use in the app. (iOS only)"
    "locationAlwaysAndWhenInUseUsageDescription": "This app needs access to device location when the app is running or in the background. (iOS and macOS)"
},

Translations

After you have generated translation files for your app, you must ensure that they are referenced in the appinfo.json file. For more information about preparing your app for translation and generating these files, see Globalize your app.

Once these files are present in your app item, the path and fileName properties must be implemented under translations in the appinfo.json file to note their location. The following example associates the files of a Map Tour template app:

"translations": {
    "path": "MapTour/languages",
    "fileName": "MapTour"
}

After you add the code sample above to your appinfo.json file, the built app uses files in the MapTour languages folder named MapTour_localecode.qm (for example, MapTour_en.qm and MapTour_ja.qm).

Additional properties

AppStudio also supports additional values in the appinfo.json file. These properties must be implemented under their corresponding categories and platforms, if necessary. As an example, the following defines all supported properties under the deployment category for Android and iOS, as well as the appIcon properties:

"deployment": {
    "android": {
        "trustUserCertificates": true,
        "minimumSdkVersion": 21,
        "targetSdkVersion": 29
    },

    "ios": {
        "minimumVersion": "10.0"
    }
}

"resources": {
    "android": {
        "appIcon": "android_appicon.png"
    },
    "ios": {
        "appIcon": "ios_appicon.png"
    },
    "linux": {
        "appIcon": "linux_appicon.png"
    },
    "macos": {
        "appIcon": "mac_appicon.png"
    },
    "windows": {
        "appIcon": "windows_appicon.png"
    }
},

The following properties can be added to the appinfo.json file:

  • backup—This property is added under capabilities. When set to false, no backup or restore of the application is ever performed on Android, and the app is excluded by full-system backups. If not specified, the default value is true.
  • ios.appTransportSecurity.allowArbitraryLoads—This property is added under capabilities. If set to false, transport security restrictions are applied for network connections. If not specified, the default value is true.
  • interAppFileSharing—This property is added under capabilities. When set to true, the files in your app can be accessed using the Files app on iOS. If not specified, the default value is false.
  • android.trustUserCertificates—This property is added under deployment. By default, AppStudio apps don't trust user-added certificate authorities for secure connections on Android. Setting this property to true causes an app to accept all certificate authorities.
  • android.minimumSdkVersion—This property is added under deployment. It defines the minimum API level required for the app to run. If not specified, the default value of an AppStudio app is 21.
  • android.targetSdkVersion—This property is added under deployment. It defines the intended API level for the app. It also affects the way the user must grant app permissions. If the device is running Android 5.1 or earlier, or your app's target SDK is 22 or lower, the user must grant the app permissions upon installation. If the device is running Android 6.0 or later, and your app's target SDK is 23 or higher, the user must request each permission it needs while the app is running. If not specified, the default value of an AppStudio app is 29. For more information, see the Google Play Console help.
  • android.enableGooglePlayServicesSecurityProvider—This property is added under deployment. This controls whether your app calls the Google Play security provider to ensure that the app is running on a device with the latest updates to protect it from known exploits. If not specified, the default value of an AppStudio app is false.
  • ios.minimumVersion—This property is added under deployment. It defines the minimum OS version on which your software can run. If not specified, the default value of an AppStudio app is 11.0.
  • enableHighDpi—This property is added under display. This determines whether the app will open in high DPI mode on devices that support this mode. If not specified, the default value is false.
  • statusBar—This property is added under display. It defines whether the status bar appears when using your app on any iOS and Android device. If not specified, the status bar is unavailable by default. This should not be confused with the usesStatusBar property set in the Status Bar options on the Settings > Devices tab for your app, which controls whether the status bar appears on phones or tablets.
  • ios.windowMode—This property is added under display. It defines how the app interacts with the iPad's Multitasking capability, allowing the app to be used alongside other apps on the same screen. By default, this property is enabled if either portrait or landscape mode is disabled in the Tablet options on the Settings > Devices tab for your app. To disable ios.windowMode, allowing your app to only run on the iPad's full screen, set it to fullscreen.
  • ignore—This property is added under make. It defines a list of file name patterns to be excluded from an app's resources when built. This allows files to be kept in the app item that are useful during development and testing but aren't needed when building the app.
  • ios.enableBitcode—This property is added under make. This specifies whether the app supports Bitcode. Apple optimizes the app binary for specific devices without requiring updating or resubmission. Bitcode is only available for iOS apps and is enabled by default for Apple App Store builds.
  • configurationSchema—This property is added under management. This accepts a file name or path for an .xml file that contains app configuration defaults used when deploying your app with Enterprise Mobile Management (EMM) software. For information about how to format this .xml file, see the AppConfig Community's documentation on managed app configurations.
  • android.restrictionFile—This property is added under management. This accepts a file name or path for an .xml file used to impose restrictions on Android devices. This is required to use app configuration when deploying your app with EMM software. For information about how to format this .xml file, see the Android developer reference for RestrictionsManager.
  • appIconBackgroundColor—This property is added under resources. This accepts a hex color value and defines the background fill color for platforms that enforce a specific icon shape. For example, iOS enforces a rounded rectangle for app icons and automatically fills transparent areas with black. If no value is specified, the default behavior for the platform is applied.
  • launchImageTextColor—This property is added under resources. This accepts a hex color value and defines the color of text that appears on your app's splash screen. The default color for this text is black, which may be difficult to see, depending on your app's splash screen.
  • platformName.appIcon—This property is added under resources. Additionally, platformName should be replaced with the platform you use. This accepts a file path to define a platform-specific app icon. If an icon is not provided for a platform, the general icon provided for the app is used.