MoECapacitorInitializer instance in applicationdidFinishLaunchingWithOptions() method as shown below:
Sample code to initialize from application:didFinishLaunchingWithOptions: method in
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Initialize the MoEngage iOS SDK in your Capacitor app’s AppDelegate with your Workspace ID.
MoECapacitorInitializer instance in applicationdidFinishLaunchingWithOptions() method as shown below:
Sample code to initialize from application:didFinishLaunchingWithOptions: method in
import UIKit
import Capacitor
import CapacitorMoengageCore
import MoEngageSDK
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let sdkConfig = MoEngageSDKConfig(withAppID: YOUR Workspace ID)
sdkConfig.moeDataCenter = .data_center_01
MoECapacitorInitializer.sharedInstance.initializeDefaultInstance(sdkConfig, andLaunchOptions: launchOptions)
return true
}
}
Was this page helpful?