Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Release Date

## Release Version

- [patch] Added support for logout callback.

# 02-02-2026

## 6.8.0
Expand Down
7 changes: 6 additions & 1 deletion Sources/MoEngagePluginBase/MoEngagePluginBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ import MoEngageInApps

@objc public func resetUser(_ userAttribute: [String: Any]) {
if let identifier = MoEngagePluginUtils.fetchIdentifierFromPayload(attribute: userAttribute) {
MoEngageSDKAnalytics.sharedInstance.resetUser(forAppID: identifier)
MoEngageSDKAnalytics.sharedInstance.resetUser { success in
let messageHandler = MoEngagePluginMessageDelegate.fetchMessageQueueHandler(identifier: identifier)
let message = MoEngagePluginUtils.fetchLogOutPayload(identifier: identifier)
messageHandler?.flushMessage(eventName: MoEngagePluginConstants.CallBackEvents.logOutCompleted, message: message)
}

}
}

Expand Down
1 change: 1 addition & 0 deletions Sources/MoEngagePluginBase/MoEngagePluginConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public struct MoEngagePluginConstants {
public static let inAppSelfHandled = "MoEInAppCampaignSelfHandled"
public static let pushTokenGenerated = "MoEPushTokenGenerated"
public static let pushClicked = "MoEPushClicked"
public static let logOutCompleted = "MoELogoutComplete"
}

struct ExternalPluginBase {
Expand Down
8 changes: 7 additions & 1 deletion Sources/MoEngagePluginBase/MoEngagePluginUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ public class MoEngagePluginUtils {

return campaignPayload
}
}

static func fetchLogOutPayload(identifier: String) -> [String: Any] {
return [MoEngagePluginConstants.General.platform: MoEngagePluginConstants.General.iOS,
MoEngagePluginConstants.General.accountMeta: createAccountPayload(identifier: identifier)
]
}
}

extension MoEngageInAppCampaign {
func fetchInAppPaylaod() -> [String: Any] {
Expand Down
Loading