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 issue: "opened_from_tray" is always undefined for local notification #555

Closed
stsiushkevich opened this issue Sep 11, 2017 · 4 comments
Closed

Comments

@stsiushkevich
Copy link

RN: 0.42.0
react-native-fcm: 7.4.0
IPhone 5 black, IOS 10.2.1

I get a remote notification when an app is in the foreground. Then I send a local notification based on the defined information from remote notification to show it in a tray. When I tap on notification(in foreground) from the tray I receive it to the listener, but I haven't "opened_from_tray" flag!!! But on Android I have it!!! I use alert to debug this case. How can I fix this trouble?

When I receive the remote notification in background and tap on it in the tray I have "opened_from_tray": 1 - all right.

@evollu
Copy link
Owner

evollu commented Sep 11, 2017

well this sounds like a bug.
try adding "opened_from_tray" in your local notification payload for now.

or if you want to test the correct fix, add [data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"]; before line 154 of RNFIRMessaging.m

@stsiushkevich
Copy link
Author

stsiushkevich commented Sep 12, 2017

Cheers!!! Thak you! This Objective-C code works correctly! Why was this code be missed?

@evollu
Copy link
Owner

evollu commented Sep 12, 2017

cause I missed it ;) Will push the fix

@evollu
Copy link
Owner

evollu commented Sep 12, 2017

published as 9.2.0

@evollu evollu closed this as completed Sep 12, 2017
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