Skip to content

Commit 83adb31

Browse files
authored
Fixing IAM Preview (#772)
* Fixing IAM preview not displaying * combining iOS version and preview check
1 parent c360722 commit 83adb31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,10 +1930,7 @@ + (void)notificationReceived:(NSDictionary*)messageDict foreground:(BOOL)foregro
19301930
[OneSignalHelper lastMessageReceived:messageDict];
19311931

19321932
BOOL isPreview = [[OSNotification parseWithApns:messageDict] additionalData][ONESIGNAL_IAM_PREVIEW] != nil;
1933-
if (isPreview && [OneSignalHelper isIOSVersionLessThan:@"10.0"]) {
1934-
return;
1935-
}
1936-
1933+
19371934
if (opened) {
19381935
// Prevent duplicate calls
19391936
let newId = [self checkForProcessedDups:customDict lastMessageId:_lastnonActiveMessageId];
@@ -1951,6 +1948,9 @@ + (void)notificationReceived:(NSDictionary*)messageDict foreground:(BOOL)foregro
19511948

19521949
// Call Action Block
19531950
[OneSignal handleNotificationOpened:messageDict foreground:foreground isActive:isActive actionType:type];
1951+
} else if (isPreview && [OneSignalHelper isIOSVersionGreaterThanOrEqual:@"10.0"]) {
1952+
let notification = [OSNotification parseWithApns:messageDict];
1953+
[OneSignalHelper handleIAMPreview:notification];
19541954
}
19551955
}
19561956

0 commit comments

Comments
 (0)