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

OneSignal tracking not working with Unity Mobile Notifications #245

Closed
czanier opened this issue Nov 13, 2019 · 2 comments
Closed

OneSignal tracking not working with Unity Mobile Notifications #245

czanier opened this issue Nov 13, 2019 · 2 comments

Comments

@czanier
Copy link

czanier commented Nov 13, 2019

Description:

OneSignal open app tracking stops working when Unity's project also includes Unity Mobile Notifications package

Environment

Steps to Reproduce Issue:

  1. Import OneSignal SDK v2.10.0
  2. Import Unity Mobile Notifications v1.0.3 from Unity's Package Manager
  3. Send a Notification using OneSignal's dashboard
  4. Open app from that notification
@jkasten2
Copy link
Member

jkasten2 commented Mar 10, 2021

This sounds like an issue where Unity Mobile Notifications Package is causing an iOS Swizzling issue where the OneSignal SDK is not getting the notification open event. It seems there has only been one report of this issue, can you try the latest Unity Mobile Notifications Package v1.3.2 to see if this is still an issue for you?

@tanaynigam
Copy link

The issue has been fixed in our recent release. You can download the OneSignal-Unity-SDK release 2.13.5 from our OneSignal-Unity-SDK release page or directly from the Unity Asset Store.

We tested the the One-Signal-Unity-SDK alongside Unity Mobile Notification Package.OneSignal.HandleNotificationOpened now handles OneSignal notifications correctly. The iOSNotificationCenter.GetLastRespondedNotification handler will correctly read Unity and OneSignal notifications. The Unity.iOS.NotificationServices.remoteNotifications[0] will also retrieve Unity and OneSignal notifications. The Unity.iOS.NotificationServices.remoteNotifications[0] is, however, a deprecated in 2018+ Unity versions.

The environment used for these tests

  • Unity 2020.3.6f1
  • OneSignal-Unity-SDK 2.13.5
  • Unity Mobile Notifications 1.3.2
  • iOS 14.5.1

Note

If iOSNotificationCenter.OnRemoteNotificationReceived has been setup on the app, OneSignal.inFocusDisplayType will not work causing the OneSignal notification to not display on the device when the app is on the foreground, unless you display local notification using Unity Mobile Notifications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants