iOS SDK Config File

ENGAGE® iOS SDK Config File

The engage-config.json file provides configuration points for network requests to the ENGAGE platform. It is required by the host appand should be added to bundle via the main app target in Xcode.

During pre-integration, First Orion will provide a engage-config.json file, similar to this one:

{
  "debug": {
    "engageApiKey": "com.your.bundle.id",
    "engagePushConfig": "foios-enterprise-dev",
    "engageEndpoint": "new-test-api.fo-engage.com"
  },
  "test": {
    "engageApiKey": "com.your.bundle.id",
    "engagePushConfig": "foios-enterprise",
    "engageEndpoint": "new-test-api.fo-engage.com"
  },
  "production": {
    "engageApiKey": "com.your.bundle.id",
    "engagePushConfig": "foios-enterprise",
    "engageEndpoint": "api.calleryd.com"
  },
  "appIsVoipEnabled": false,
  "engageChallengeType": "sms",
  "configVersion": "0.1"
}

Fields to highlight in the JSON file:

FieldTypeDescription
engageApiKey StringMust match iOS application's Bundle Identifier - configured in Xcode
engageEndpoint StringENGAGE platform endpoint - this will typically never change
engagePushConfig StringENGAGE platform APNS config. -dev suffix indicates APNS Sandbox will be used
engageChallengeType StringThe challenge type will determine the initial ENGAGE registration process
appIsVoipEnabled BooleanThis is a legacy field and should always be set to false

The three sub-objects, referred to as the EngageEnvironment values (debug, test, and production), are selected by the SDK configuration API method Engage.shared.configure (for environment: EngageEnvironment, ...). This allows the host app to support up to three different configurations, but typically only two are used: one for testing and one for production.

The host app determines which EngageEnvironment is used, based on the value set in the Engage.shared.configure(...) method.

let environment: EngageEnvironment = .production // or .test or .debug
Engage.shared.configureSDK(for: environment, with: "group.your-app-group-id")

What’s Next