Skip to content

Commit

Permalink
fix(ios): callback not called when foreground is true #101 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshsavani810 committed Oct 21, 2023
1 parent 21b1d93 commit 9cbc67c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ios/AppDelegate+notification.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,14 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
case UIApplicationStateInactive:
{
NSLog(@"coldstart");
self.launchNotification = response.notification.request.content.userInfo;

if([response.actionIdentifier rangeOfString:@"UNNotificationDefaultActionIdentifier"].location == NSNotFound) {
self.launchNotification = userInfo;
}
else {
self.launchNotification = response.notification.request.content.userInfo;
}

self.coldstart = [NSNumber numberWithBool:YES];
break;
}
Expand Down

0 comments on commit 9cbc67c

Please sign in to comment.