Skip to content
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

Handle tap on push notification #1361

Closed
1 task done
igorsquadra opened this issue Jan 23, 2024 · 2 comments
Closed
1 task done

Handle tap on push notification #1361

igorsquadra opened this issue Jan 23, 2024 · 2 comments

Comments

@igorsquadra
Copy link

igorsquadra commented Jan 23, 2024

How can we help?

I need to handle the tap on push notification with launch url. I migrate from 2.5.2 to 5.0.5 and my old code was:

OneSignal.initWithLaunchOptions(launchOptions, appId: "appId", handleNotificationReceived: { (notification) in self.open((notification?.payload)!) }, handleNotificationAction: nil, settings: [kOSSettingsKeyInFocusDisplayOption: "None", kOSSettingsKeyInAppLaunchURL: false])

Can you please help me with this migration?
I wasn't able to find something interesting in the documentation

Code of Conduct

  • I agree to follow this project's Code of Conduct
@emawby
Copy link
Contributor

emawby commented Jan 30, 2024

@igorsquadra Hello you will want to use the clickListener method in the Notification namespace. This listener will be called whenever a notification is tapped including when it is used to launch the app.

@emawby
Copy link
Contributor

emawby commented Feb 2, 2024

Closing for now. Feel free to tag me to reopen if you need additional help.

@emawby emawby closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants