Closed ben-aw closed 11 months ago
Seeing this as well.
This code appears to be the issue. I already have the app running and then opened a push notification. Since userTapsOnNotificationCount
is 0 it skips it. But at this point we already checked Push.instance.notificationTapWhichLaunchedAppFromTerminated
and the data was null.
// Avoid sending the message that launched the app. We will send that one when the user requests for the "Push.instance.notificationTapWhichLaunchedAppFromTerminated" (Dart code)
if (userTapsOnNotificationCount > 0) {
// let message = PURemoteMessage.fromNotificationContent(content: response.notification.request.content)
pushFlutterApi.onNotificationTapData(response.notification.request.content.userInfo as! [String: Any]) { _ in }
}
callOriginalDidReceiveDelegateMethod(center: center, response: response, completionHandler: completionHandler)
userTapsOnNotificationCount += 1
}
Looks like @kaiquegazola's MR has fixed it. I've released it as 1.0.1. Thanks for reporting the issue
It's working great! Thanks for the fix 👍
Hello,
Push.instance.onNotificationTap.listen
does not trigger for iOS the first time a notification is tapped.I subscribe to
Push.instance.onNotificationTap.listen
in the apps main function.If I minimize the app, send a push notification, tap it to open the app,
Push.instance.onNotificationTap.listen
is never called.If I minimize the app again and send another push, it will work.
Android works as it should.
Any thoughts as to what might be causing that? Thanks for your help!