Config

The Config object provides an interface for passing common configurable values to UAirship. The simplest way to use this class is to add an AirshipConfig.plist file in your app’s bundle and set the desired options.

  • The development app key. This should match the application on go.urbanairship.com that is configured with your development push certificate.

  • The development app secret. This should match the application on go.urbanairship.com that is configured with your development push certificate.

  • The production app key. This should match the application on go.urbanairship.com that is configured with your production push certificate. This is used for App Store, Ad-Hoc and Enterprise app configurations.

  • The production app secret. This should match the application on go.urbanairship.com that is configured with your production push certificate. This is used for App Store, Ad-Hoc and Enterprise app configurations.

  • The log level used for development apps. Defaults to debug.

  • The log level used for production apps. Defaults to error.

  • The airship cloud site. Defaults to us.

  • Default enabled Airship features for the app. For more details, see PrivacyManager. Defaults to all.

  • The default app key. Depending on the inProduction status, developmentAppKey or productionAppKey will take priority.

  • The default app secret. Depending on the inProduction status, developmentAppSecret or productionAppSecret will take priority.

  • The production status of this application. This may be set directly, or it may be determined automatically if the detectProvisioningMode flag is set to true. If neither inProduction nor detectProvisioningMode is set, detectProvisioningMode will be enabled.

  • Apps may be set to self-configure based on the APS-environment set in the embedded.mobileprovision file by using detectProvisioningMode. If detectProvisioningMode is set to true, the inProduction value will be determined at runtime by reading the provisioning profile. If it is set to false (the default), the inProduction flag may be set directly or by using the AirshipConfig.plist file.

    When this flag is enabled, the inProduction will fallback to true for safety so that the production keys will always be used if the profile cannot be read in a released app. Simulator builds do not include the profile, and the detectProvisioningMode flag does not have any effect in cases where a profile is not present. When a provisioning file is not present, the app will fall back to the inProduction property as set in code or the AirshipConfig.plist file.

  • If enabled, the Airship library automatically registers for remote notifications when push is enabled and intercepts incoming notifications in both the foreground and upon launch.

    Defaults to true. If this is disabled, you will need to register for remote notifications in application:didFinishLaunchingWithOptions: and forward all notification-related app delegate calls to UAPush and UAInbox.

  • An array of UAURLAllowList entry strings. This url allow list is used for validating which URLs can be opened or load the JavaScript native bridge. It affects landing pages, the open external URL and wallet actions, deep link actions (if a delegate is not set), and HTML in-app messages.

    Note

    See UAURLAllowList for pattern entry syntax.
  • An array ofUAURLAllowList entry strings. This url allow list is used for validating which URLs can load the JavaScript native bridge, It affects Landing Pages, Message Center and HTML In-App Messages.

    Note

    See UAURLAllowList for pattern entry syntax.
  • An array of UAURLAllowList entry strings. This url allow list is used for validating which URLs can be opened. It affects landing pages, the open external URL and wallet actions, deep link actions (if a delegate is not set), and HTML in-app messages.

    Note

    See UAURLAllowList for pattern entry syntax.
  • Whether to suppress console error messages about missing allow list entries during takeOff.

    Defaults to false.

  • The iTunes ID used for Rate App Actions.

  • Toggles Airship analytics. Defaults to true. If set to false, many Airship features will not be available to this application.

  • The Airship default message center style configuration file.

  • If set to true, the Airship user will be cleared if the application is restored on a different device from an encrypted backup.

    Defaults to false.

  • If set to true, the application will clear the previous named user ID on a re-install. Defaults to false.

  • Flag indicating whether channel capture feature is enabled or not.

    Defaults to true.

  • Flag indicating whether delayed channel creation is enabled. If set to true channel creation will not occur until channel creation is manually enabled.

    Defaults to false.

  • Flag indicating whether extended broadcasts are enabled. If set to true the AirshipReady NSNotification will contain additional data: the channel identifier and the app key.

    Defaults to false.

  • Dictionary of custom config values.

  • If set to ‘YES’, the Airship SDK will request authorization to use notifications from the user. Apps that set this flag to false are required to request authorization themselves.

    Defaults to true.

  • If set to true, the SDK will wait for an initial remote config instead of falling back on default API URLs.

    Defaults to true.

  • The Airship URL used to pull the initial config. This should only be set if you are using custom domains that forward to Airship.

  • The Airship chat API URL.

  • The Airship web socket URL.

  • Returns the resolved app key.

  • Returns the resolved app secret.

  • Returns the resolved log level.

  • Creates an instance using the values set in the AirshipConfig.plist file.

  • Creates an instance using the values found in the specified .plist file.

  • Creates an instance with empty values.

  • Creates an instance using the values found in the specified .plist file.

  • Creates an instance with empty values.

  • Validates the current configuration. In addition to performing a strict validation, this method will log warnings and common configuration errors.

  • Validates the current configuration. In addition to performing a strict validation, this method will log warnings and common configuration errors.