iOS

For initializing the project, you'll need to provide the Workspace ID (earlier App ID) of your MoEngage App.

 

Getting Workspace ID :

Login to your MoEngage account, go to Settings in the left panel of the dashboard. Under General Settings, you will find your Workspace ID.

Once you get the AppId, go to your AppDelegate file and call the below initialization method in application:didFinishLaunchingWithOptions: method:

Note: For swift applications add #import <ReactNativeSegmentMoEngage/MoEngageSegmentReactInitializer.h> in App-Bridging-Header.h file. If you have added the react-native-moengage plugin , follow the doc for initialization.

Swift Objective-C
import MoEngageSDK  
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  
    let sdkConfig = MoEngageSDKConfig(appId: "YOUR APPID", dataCenter: DATA_CENTER);
    sdkConfig.enableLogs = true
    MoEngageSegmentReactInitializer.sharedInstance().initializeDefaultSDKConfig(sdkConfig, andLaunchOptions: launchOptions))
 
    //Rest of the implementation of method
    //-------
    return true
}

Following details of the different data centers you need to set based on the dashboard hosts

Data Center Dashboard host

data_center_01

dashboard-01.moengage.com

data_center_02

dashboard-02.moengage.com

data_center_03

dashboard-03.moengage.com

data_center_04

dashboard-04.moengage.com

data_center_05

dashboard-05.moengage.com

Refer to the doc to configure the properties of MoEngageSDKConfig.

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?