-
Notifications
You must be signed in to change notification settings - Fork 762
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 cannot receive first push notification when open in foreground #508
Comments
My current fix:
|
BTW, I think the file causing this issue should be |
I am also facing the exactly same problem on react-native-notifications: 3.1.2 and react-native 0.60 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The issue has been closed for inactivity. |
Hi @samchan1995, the issue is still there :( Can you please share the way you solved that? Much appreciated! |
The @samchan1995 implementation works for me on version 3.1.1. Do you still need the AppDelegate file ? RN version: 0.61.4 |
It's also happening to me but I don't think that downgrade should be the solution. I'll try to track this down. RN version: 0.61.5 |
To fix this bug in RN notifications 3.1.4, go first to diff --git a/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.m b/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.m
index d5e953a..18075da 100644
--- a/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.m
+++ b/node_modules/react-native-notifications/lib/ios/RNNotificationsStore.m
@@ -16,8 +16,13 @@ + (instancetype)sharedInstance {
- (instancetype)init {
self = [super init];
- _actionCompletionHandlers = [NSMutableDictionary new];
- _presentationCompletionHandlers = [NSMutableDictionary new];
+ if (!_actionCompletionHandlers){
+ _actionCompletionHandlers = [NSMutableDictionary new];
+ }
+
+ if (!_presentationCompletionHandlers) {
+ _presentationCompletionHandlers = [NSMutableDictionary new];
+ }
return self;
} I won't put together a PR because it seems that the maintainers are not accepting/reviewing PRs, however, if @yogevbd is willing to review it, I'll be glad to do it. |
Any updates on this? I'm experiencing the same issue. I'm on v3.2.2. |
this is actually worked :/ |
Same problem |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Not stale. Is a fix live yet? |
When you set this - |
Version: 3.1.2
RN version: 0.61.5
Using this version and lines from documentation
I can only see the push notification alert starts from 2nd push notification, but not the first one.
The text was updated successfully, but these errors were encountered: