-
Notifications
You must be signed in to change notification settings - Fork 281
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
Notification payload userInteraction always false #152
Comments
Facing Same issue..... 😐 |
Thanks @Dallas62 i will try it tomorrow |
This issue should be fixed now 😉 |
I had a different case to this on iOS:
However when notification is in the background and killed state no matter if there is user interaction or not the Using:
|
@Dallas62 still not working |
You need to install the latest version of the iOS library |
@Dallas62 I have updated to the latest iOS library ForegroundReceived notification (while App at Foreground)
After Tapping notification (while App at Foreground)
BackgroundReceived notification (while App at Background) After Tapping notification (while App at Background)
My questions:
|
Hi @TommyLeong Actually this should not have impacted the |
@Dallas62 i'm not using hook, im getting my notification here.
|
Yes but can you test with an older version of |
@Dallas62 Here's the result with ForegroundReceived notification (while App at Foreground)
After Tapping notification (while App at Foreground)
BackgroundReceived notification (while App at Background) After Tapping notification (while App at Background)
|
Thanks for the feed back, so it's not related to the PR of |
Back to my question earlier, we are suppose refer to userInteraction returned in data? Since it's returning 1 to me. |
If you are using the iOS library, yes. |
Yup. Using both zo0r/react-native-push-notification and this library. Alright, appreciate bro! I'll create a separate issue for the data missing. |
@TommyLeong in my case, everything is fine. Could you please give AppDelegate.m, maybe I can help you |
@gibrandev When you say everything is fine, are you getting the same response like mine? Getting the
|
Yes like this |
Yup, then we are getting the same. I was just confirming with Dallas whether this is expected. Apparently this is the case
|
Maybe you can modification this, before #122 i am used this. // Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
// Still call the JS onNotification handler so it can display the new message right away
NSDictionary *userInfo = notification.request.content.userInfo;
NSMutableDictionary *userInfoCopy = [userInfo mutableCopy];
userInfoCopy[@"userInteraction"] = @false;
[RNCPushNotificationIOS didReceiveRemoteNotification:userInfoCopy
fetchCompletionHandler:^void (UIBackgroundFetchResult result){}];
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}
// Required for the notification event. You must call the completion handler after handling the remote notification.
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
NSMutableDictionary *userInfoCopy = [userInfo mutableCopy];
userInfoCopy[@"userInteraction"] = @true;
[RNCPushNotificationIOS didReceiveRemoteNotification:userInfoCopy fetchCompletionHandler:completionHandler];
} |
@Dallas62 maybe you can help us. 😄 |
closed #122 |
@TommyLeong Have you found a solution for the missing |
I am always received userInteraction false, if click notification always userInteraction false. I dont know this bug or not. Anyone can help me?
The text was updated successfully, but these errors were encountered: