MoEngageSDKCore
@objc
public class MoEngageSDKCore : NSObject
-
Declaration
Swift
@objc public static let sharedInstance: MoEngageSDKCore
-
Register the user
Declaration
Swift
@objc public func registerUser(data: String, completionHandler: @escaping UserRegistrationHandler)
Parameters
data
JWT token
completionHandler
returns the status of registration data
-
Register the user for Secondary instance
Declaration
Swift
@objc public func registerUser(data: String, appId: String? = nil, completionHandler: @escaping UserRegistrationHandler)
Parameters
data
JWT token
appId
MoEngage Account identifier
completionHandler
returns the status of registration data
-
UnRegister the User
Note
This API should be called only if user is registered successfully at some point using registerUserDeclaration
Swift
@objc public func unregisterUser(data: String, completionHandler: @escaping UserRegistrationHandler)
Parameters
data
JWT token
completionHandler
returns the status of Unregistration data
-
UnRegister the User for Secondary instance
Note
This API should be called only if user is registered successfully at some point using registerUserDeclaration
Swift
@objc public func unregisterUser(data: String, appId: String? = nil, completionHandler: @escaping UserRegistrationHandler)
Parameters
data
JWT token
appId
MoEngage Account identifier
completionHandler
returns the status of Unregistration data
-
Check if User has registered
Declaration
Swift
@objc public func getUserRegistrationStatus(completionHandler: @escaping UserRegistrationStatusHandler)
Parameters
completionHandler
true if user is registered else false
-
Check if User has registered for Secondary instance
Declaration
Swift
@objc public func getUserRegistrationStatus(forAppId appId: String? = nil, completionHandler: @escaping UserRegistrationStatusHandler)
Parameters
appId
MoEngage Account identifier
completionHandler
true if user is registered else false
-
Fetches unique ID generated by the MoEngage SDK.
Declaration
Swift
@objc public func getMoEngageDeviceId(completionHandler: @escaping UserInfoHandler)
Parameters
completionHandler
returns UUID generated by the MoEngage SDK
-
Fetches unique ID generated by the MoEngage SDK for Secondary instance
Declaration
Swift
@objc public func getMoEngageDeviceId(appId: String? = nil, completionHandler: @escaping UserInfoHandler)
Parameters
appId
MoEngage Account identifier
completionHandler
returns UUID generated by the MoEngage SDK
-
API to enable the common logs which are not specific to any AppId.
Declaration
Swift
@objc public func enableAllLogs()
-
API to disable the common logs which are not specific to any AppId.
Declaration
Swift
@objc public func disableAllLogs()