-
Notifications
You must be signed in to change notification settings - Fork 68
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 Tapped not working on iOS / Xamarin.Forms #417
Comments
@j-bbr please try version 10.1.6, make sure to call LocalNotificationCenter.SetUserNotificationCenterDelegate(); public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LocalNotificationCenter.SetUserNotificationCenterDelegate();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
public override void WillEnterForeground(UIApplication uiApplication)
{
LocalNotificationCenter.ResetApplicationIconBadgeNumber(uiApplication);
base.WillEnterForeground(uiApplication);
}
} |
I've tried it and unfortunately the other changes to UserNotificationCenterDelegate broke iOS Foreground Notifications |
@j-bbr can you please attach a sample project? |
@j-bbr Try version 10.1.7 |
I have the same issue. I tried this method, but still not working. Notification pops up, but the tapped action doesn't work. @j-bbr Did you solve your problem? |
@Cinmay2014 Yes please attach a sample project |
@thudugala Hi Elvin, attached is the sample project. It works fine for Android but failed for iOS. |
@Cinmay2014 it works for me |
@thudugala Can you test the weekly notification? when the weekly notification pops up and it is clicked, nothing happened. It should navigate to the weeklytips page. |
Describe the bug
No NotificationActionTapped or NotificationReceived events on Xamarin.Forms.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Notification Events firing
Screenshots
If applicable, add screenshots to help explain your problem.
Platform (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
I noticed that the Plugin comes with it's own Notification Delegate for iOS as described here. But I haven't seen where it's actually initialized in the documentation or the sample. So setting it in
AppDelegate.FinishedLaunching
like this:UNUserNotificationCenter.Current.Delegate = new UserNotificationCenterDelegate();
gave me the expected behaviour. Happy to add that to the documentation if desired.
The text was updated successfully, but these errors were encountered: