Initialization Method Changes
We have updated the initialization method of SDK with SDKConfig as the required parameter and sdkState as an optional parameter.Deprecated methods
Setting Region/Data Center
MoEngageDataCenter: DataCenter class name has been updated in the SDK version9.0.0. Following are the existing ones used in the SDK version in 8.2.0 and above.
| SDK Version 8.2.0 | SDK Version 9.0.0 |
|---|---|
| MODataCenter | MoEngageDataCenter |
Install/Update differentiation
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MoEngage.sharedInstance().appStatus(.install) | MoEngageSDKAnalytics.sharedInstance.appStatus(.install) |
Analytics:
From SDK version9.0.0, we have updated methods related to Analytics. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MOAnalytics | MoEngageSDKAnalytics |
Inapps
From SDK version9.0.0, we have updated methods related to Inapps. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MOInapp | MoEngageSDKInApp |
| MOInApp.sharedInstance().showCampaign() | MoEngageSDKInApp.sharedInstance.showInApp() |
| MOInApp.sharedInstance().showNudge(at: NudgePositionTop) | MoEngageSDKInApp.sharedInstance.showNudge(atPosition: NudgePositionTop) |
| MOInAppNativeDelegate | MoEngageInAppNativeDelegate |
| func inAppShown(withCampaignInfoinappCampaign: MOInAppCampaign, foraccountMeta: MOAccountMeta) | func inAppShown(withCampaignInfoinappCampaign: MoEngageInAppCampaign, forAccountMetaaccountMeta: MoEngageAccountMeta) |
func inAppDismissed(withCampaignInfoinappCampaign: MOInAppCampaign, foraccountMeta: MOAccountMeta) | func inAppDismissed(withCampaignInfoinappCampaign: MoEngageInAppCampaign,forAccountMetaaccountMeta: MoEngageAccountMeta) |
func inAppClicked(withCampaignInfoinappCampaign: MOInAppCampaign, andCustomActionInfocustomAction: MOInAppAction, foraccountMeta: MOAccountMeta) | func inAppClicked(withCampaignInfoinappCampaign: MoEngageInAppCampaign, andCustomActionInfocustomAction: MoEngageInAppAction, forAccountMetaaccountMeta: MoEngageAccountMeta) |
func inAppClicked(withCampaignInfoinappCampaign: MOInAppCampaign, andNavigationActionInfonavigationAction: MOInAppAction, foraccountMeta: MOAccountMeta) | func inAppClicked(withCampaignInfoinappCampaign: MoEngageInAppCampaign, andNavigationActionInfonavigationAction: MoEngageInAppAction, forAccountMetaaccountMeta: MoEngageAccountMeta) |
func selfHandledInAppTriggered(withInfoinappCampaign: MOInAppSelfHandledCampaign, foraccountMeta: MOAccountMeta) | func selfHandledInAppTriggered(withInfoinappCampaign: MoEngageInAppSelfHandledCampaign, forAccountMetaaccountMeta: MoEngageAccountMeta) |
Cards
From SDK version9.0.0, we have updated methods related to Cards. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MOCards | MoEngageSDKCards |
| MOCardsDelegate | MoEngageCardsDelegate |
| MOCardsViewControllerDelegate | MoEngageCardsDelegate |
@objc optional func cardsSyncedSuccessfully(forAccountMeta accountMeta: MOAccountMeta) | @objc optional func cardsSyncedSuccessfully(forAccountMeta accountMeta: MoEngageAccountMeta) |
Push Notification
From SDK version9.0.0, we have updated methods related to Push Notifications. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MORichNotification | MoEngageSDKRichNotification |
MoEngage.sharedInstance().registerForRemoteNotification(withCategories: nil, withUserNotificationCenterDelegate: self) | MoEngageSDKMessaging.sharedInstance.registerForRemoteNotification(withCategories: nil, andUserNotificationCenterDelegate: self) |
MoEngage.sharedInstance().setPushToken(deviceToken) | MoEngageSDKMessaging.sharedInstance.setPushToken(deviceToken) |
MoEngage.sharedInstance().didFailToRegisterForPush() | MoEngageSDKMessaging.sharedInstance.didFailToRegisterForPush() |
MoEngage.sharedInstance().userNotificationCenter(center, didReceive: response) | MoEngageSDKMessaging.sharedInstance.userNotificationCenter(center, didReceive: response) |
MoEngage.sharedInstance().didReceieveNotificationinApplication(application, withInfo: userInfo) | MoEngageSDKMessaging.sharedInstance.didReceieveNotification(inApplication: application, withInfo: userInfo) |
MoEngage.sharedInstance().setDisableBadgeReset(true) | MoEngageSDKMessaging.sharedInstance.disableBadgeReset(true) |
MOMessaging.sharedInstance.setMessagingDelegate(self) | MoEngageSDKMessaging.sharedInstance.setMessagingDelegate(self) |
RealTimeTrigger:
From SDK version9.0.0, we have updated methods related to RealTime Trigger. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MORealTimeTrigger | MoEngageSDKRealTimeTrigger |
Location Triggered
From SDK version9.0.0, we have updated methods related to Location Trigger. Refer to the table below to use the updated one.
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MOGeofence | MoEngageSDKGeofence |
MOGeofenceHandler.sharedInstance().delegate = self | MoEngageSDKGeofence.sharedInstance.setGeofenceDelegate(self) |
Inbox
| SDK Version 8.x.x | SDK Version 9.0.0 |
|---|---|
| MOInbox | MoEngageSDKInbox |
| MOInboxViewController | MoEngageInboxViewController |
func getInboxViewController(withUIConfiguration uiConfig: MOInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MOInboxViewControllerDelegate? = nil, forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping (MOInboxViewController?)->()) | func getInboxViewController(withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping (MoEngageInboxViewController?)->()) |