-
Notifications
You must be signed in to change notification settings - Fork 264
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
[question]: Trying to capture notification payload from OneSignal #1513
Comments
Having the same issue can't get any
Might've figured it out, the OneSignal.initialize("oneSignalAPIKey", withLaunchOptions: launchOptions)
UNUserNotificationCenter.current().delegate = self 🤪 |
@mirko-milovanovic-vidiemme I was able to get it working by following https://documentation.onesignal.com/docs/mobile-sdk-reference#addforegroundlifecyclelistener. Update: actually that appears to be only when the app is in the foreground. |
you have to implement a Notification Service Extension to always get the notification payload. For background pushs (without a visible notification), there is an extra setup needed to get the payload. |
Thanks for your suggestions from @mirko-milovanovic-vidiemme and @bbjay. I will close this issue, please ping me to re-open if the question is not resolved. |
How can we help?
I'm attempting to capture the incoming notification, but I'm unable to hit my breakpoints within
UNUserNotificationCenterDelegate
. How would I go about capturing the notification from OneSignal?Code of Conduct
The text was updated successfully, but these errors were encountered: