File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
iOS_SDK/OneSignalSDK/Source Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2243,15 +2243,14 @@ + (BOOL)remoteSilentNotification:(UIApplication*)application UserInfo:(NSDiction
22432243 }
22442244 }
22452245 // Method was called due to a tap on a notification - Fire open notification
2246- else if (application.applicationState != UIApplicationStateBackground ) {
2246+ else if (application.applicationState == UIApplicationStateActive ) {
22472247 [OneSignalHelper lastMessageReceived: userInfo];
22482248
2249- if (application.applicationState == UIApplicationStateActive)
2250- [OneSignalHelper handleNotificationReceived: OSNotificationDisplayTypeNotification fromBackground: NO ];
2251-
2252- if (![OneSignalHelper isRemoteSilentNotification: userInfo])
2253- [OneSignal notificationReceived: userInfo foreground: application.applicationState == UIApplicationStateActive isActive: NO wasOpened: YES ];
2249+ [OneSignalHelper handleNotificationReceived: OSNotificationDisplayTypeNotification fromBackground: NO ];
22542250
2251+ if (![OneSignalHelper isRemoteSilentNotification: userInfo]) {
2252+ [OneSignal notificationReceived: userInfo foreground: YES isActive: NO wasOpened: YES ];
2253+ }
22552254 return startedBackgroundJob;
22562255 }
22572256 // content-available notification received in the background - Fire handleNotificationReceived block in app
You can’t perform that action at this time.
0 commit comments