Migration From Old Dengage SDK

Removal of Dengage.setIntegrationKey Method

You can use Denage.start method for setting integration key.

// Old SDK
Dengage.setIntegrationKey(key: String)

// New SDK
Dengage.start(apiKey: "YOUR-DENGAGE-INTEGRATION-KEY", application: application, launchOptions: launchOptions)

Removal of DengageEvent Class

DengageEvent class removed. DengageEvent functions moved to Dengage class.

// In old SDK
DengageEvent.shared.pageView(params)

// In new sdk
Dengage.pageView(params)

// In old SDK
Dengage.SendDeviceEvent(toEventTable: 'events', andWithEventDetails: params)

// In new SDK
Dengage.sendCustomEvent(to: 'eventTable', details: params)

Initiation of Dengage

Changed initiation of the SDK. You should just call the init function with parameters.

// In old SDK
Dengage.initWithLaunchOptions(withLaunchOptions: launchOptions, badgeCountReset: false)

// In new SDK
Dengage.start(apiKey: "YOUR-DENGAGE-INTEGRATION-KEY", application: application, launchOptions: launchOptions)

Removed Methods and Alternatives

We removed, renamed or moved some methods in the new SDK. You should make changes for migration with respect to the table below.

Old SDKNew SDK
Dengage.initWithLaunchOptions(withLaunchOptions: launchOptions, badgeCountReset: false)Dengage.start(apiKey: "YOUR-DENGAGE-INTEGRATION-KEY", application: application, launchOptions: launchOptions)
Dengage.setToken(token: String)Dengage.register(token: Data)
Dengage.setUserPermission(permission: (Bool))Dengage.set(permission: (Bool))
Dengage.disableOpenURL = trueDengage.init(with:DengageOptions)
Dengage.setContactKey(contactKey: "userId")Dengage.set(contactKey: "userId")
DengageEvent.shared.addToCart(params : params)Dengage.addToCart(params)
DengageEvent.shared.removeFromCart(params : params)Dengage.removeFromCart(params)
Dengage.SendDeviceEvent(toEventTable: 'events', andWithEventDetails: params)Dengage.sendCustomEvent(to: 'eventTable', details: params)