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

[iOS] When app is in background "opened" callback does not fire #613

Closed
steverob opened this issue Aug 24, 2018 · 7 comments
Closed

[iOS] When app is in background "opened" callback does not fire #613

steverob opened this issue Aug 24, 2018 · 7 comments

Comments

@steverob
Copy link

steverob commented Aug 24, 2018

Description:
When the app is in background mode, and the user taps on an incoming notification, the opened callback is not firing.

When the app is in focus, and we have OneSignal.inFocusDisplaying(2) set, the notification shows and if the user taps it, nothing happens. received callback is fired though.

On Android, in both cases when I tap the notification, the opened callback is firing without any issues.

Is this the expected behaviour? What I want to happen is - when the notification is displayed (app is in background) and the user taps it, the app should be opened and the opened callback should be fired so that I can navigate the user to a screen (using a deeplink sent with additionalData).

Environment

OneSignal RN SDK - 3.2.6
RN - 0.55.4
iOS - 11.2.6

AppDelegate.m - https://gist.github.com/steverob/25c969ded98dce44ca168309d67a103f

I followed the setup instructions detailed in the documentation and also added the Notification Service Extension.

@motogod
Copy link

motogod commented Aug 30, 2018

I have the same issue, but it happens on Android.

When the app is in background mode, the user taps on an incoming notification, the opened callback is not firing and there is no additionalData in received callback.

I test it in Android simulator 8.0.0 and physical device 8.1.0.

Any one has the same issue even in Android or IOS ?

Environment
"react": "16.3.1",
"react-native": "~0.55.2",
"react-native-onesignal": "^3.2.6"

@steverob
Copy link
Author

steverob commented Aug 30, 2018 via email

@Nightsd01
Copy link
Contributor

Nightsd01 commented Sep 7, 2018

@steverob Apologies for the delayed response, can you reproduce this issue in our example project? If so - can you please upload it to dropbox and post a link?

The example project is in the examples folder of this repository. Clone the repo, run npm i (or yarn), run react-native link react-native-onesignal and try running the iOS project, replace with your own App ID, iOS bundle identifier, etc.

@Nightsd01
Copy link
Contributor

Closing due to no response - if you're still running into this problem please feel free to respond and I'll be happy to reopen and help investigate

@steverob
Copy link
Author

steverob commented Sep 12, 2018 via email

@Nightsd01
Copy link
Contributor

@steverob since I cannot reproduce this issue, can you attempt to reproduce it in our demo project?

90% of the time when a user reports this problem it usually turns out to be user error, so it would be good to make sure you can reproduce it in our demo project. If you can, it would be very helpful to share a Dropbox link

@triasrahman
Copy link

It still happens, especially on iOS background service.

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

4 participants