Initialize the SDK with Your Credentials
Learn about SDK initialization for Brand Messenger Legacy iOS SDK
Once you've integrated the library into your project, you can initialize the SDK using your unique App ID and region.
To do this, open the xcworkspace
and initialize the BrandMessenger SDK in AppDelegate didFinishLaunchingWithOptions
.
In the examples below, replace IOS_INTEGRATION_ID
with your app ID.
let settings = KBMSettings(integrationId: IOS_INTEGRATION_ID)
BrandMessenger.initWith(settings) { (error: Error?, userInfo: [AnyHashable : Any]?) in }
let settings = KBMSettings(integrationId: "YOUR_APP_INTEGRATION_ID")
settings.region = "eu-1"
BrandMessenger.initWith(settings) { (error: Error?, userInfo: [AnyHashable : Any]?) in
if (error == nil) {
// Your code after init is complete
} else {
// Something went wrong during initialization
}
}
Updated 10 months ago