Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added markReadInboxMessages api to mark multiple inbox messages as … #43

Merged
merged 1 commit into from
May 15, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ void Start() {
[System.Runtime.InteropServices.DllImport("__Internal")]
private static extern void CleverTap_markReadInboxMessageForID(string messageId);

[System.Runtime.InteropServices.DllImport("__Internal")]
private static extern void CleverTap_markReadInboxMessagesForIDs(string[] messageIds,int arrLength);

[System.Runtime.InteropServices.DllImport("__Internal")]
private static extern void CleverTap_recordInboxNotificationViewedEventForID(string messageId);

Expand Down Expand Up @@ -526,6 +529,11 @@ public static void MarkReadInboxMessageForID(string messageId) {
CleverTap_markReadInboxMessageForID(messageId);
}

public static void MarkReadInboxMessagesForIDs(string[] messageIds) {
int arrLength = messageIds.Length;
CleverTap_MarkReadInboxMessagesForIDs(messageIds, arrLength);
}

public static void RecordInboxNotificationViewedEventForID(string messageId) {
CleverTap_recordInboxNotificationViewedEventForID(messageId);
}
Expand Down
4 changes: 4 additions & 0 deletions Plugin/CleverTapUnity/iOS/CleverTapBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ void CleverTap_markReadInboxMessageForID(const char* messageId) {
[[CleverTapUnityManager sharedInstance] markReadInboxMessageForID:clevertap_stringToNSString(messageId)];
}

void CleverTap_markReadInboxMessagesForIDs(const char* messageIds[], int size) {
[[CleverTapUnityManager sharedInstance] markReadInboxMessagesForIDs:clevertap_NSArrayFromArray(messageIds, size)];
}

void CleverTap_recordInboxNotificationViewedEventForID(const char* messageId) {
[[CleverTapUnityManager sharedInstance] recordInboxNotificationViewedEventForID:clevertap_stringToNSString(messageId)];
}
Expand Down
1 change: 1 addition & 0 deletions Plugin/CleverTapUnity/iOS/CleverTapUnityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
- (void)deleteInboxMessageForID:(NSString *)messageId;
- (void)deleteInboxMessagesForIDs:(NSArray *)messageIds;
- (void)markReadInboxMessageForID:(NSString *)messageId;
- (void)markReadInboxMessagesForIDs:(NSArray *)messageIds;
- (void)recordInboxNotificationViewedEventForID:(NSString *)messageId;
- (void)recordInboxNotificationClickedEventForID:(NSString *)messageId;

Expand Down
4 changes: 4 additions & 0 deletions Plugin/CleverTapUnity/iOS/CleverTapUnityManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ - (void)markReadInboxMessageForID:(NSString *)messageId {
[clevertap markReadInboxMessageForID:messageId];
}

- (void)markReadInboxMessagesForIDs:(NSArray *)messageIds {
[clevertap markReadInboxMessagesForIDs:messageIds];
}

- (void)recordInboxNotificationViewedEventForID:(NSString *)messageId {

[clevertap recordInboxNotificationViewedEventForID:messageId];
Expand Down