MobileAppMessaging
@objc(SFMobileAppMessaging)
public final class MobileAppMessaging : NSObject, SFMCModule, Publisher
extension MobileAppMessaging: Subscriber
extension MobileAppMessaging: MobileAppMessagingApi
extension MobileAppMessaging: MobileAppMessagingProtocol
This class is a Swift Interface for SFMobileAppMessaging
-
Requests the MobileAppMessaging Module when it’s operational and safe to use. The provided callback will be invoked with the MobileAppMessaging Module when it’s ready. All MobileAppMessaging module-related API calls should be made within this function.
Declaration
Swift
@objc public static func requestSdk(_ callback: @escaping (_ mamCore: MobileAppMessagingApi?) -> Void)Parameters
callbackA callback that will receive the MobileAppMessaging Module when it’s operational/ready.
-
Register a callback that will be notified when Registration related events happen
@param registrationCallback closure to be provided when registration event occurs
Declaration
Swift
public func setRegistrationCallback(_ registrationCallback: @escaping (Dictionary<AnyHashable, Any>) -> Void) -
Removes the registration callback
Declaration
Swift
public func unsetRegistrationCallback() -
Returns the unique identifier associated with the device.
Declaration
Swift
public func deviceIdentifier() -> String?Return Value
A
Stringrepresenting the device identifier, ornilif unavailable.
-
Developer override to set the state of analytics enablement. If set false, the SDK will stop tracking analytics and also purges all the analytics stored locally. This value takes precedence over the config setting which is passed during the SDK initialization.
Declaration
Swift
public func setAnalyticsEnabled(_ enabled: Bool) -
The current state of the Analytics enablement override
Declaration
Swift
public func isAnalyticsEnabled() -> BoolReturn Value
A BOOL value of the Analytics enablement override considering config setting .
MobileAppMessaging Class Reference