You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On iOS, NotificationReceiving is not fired when app is not in foreground...
I would like to show a local notification at 10:00 am each day except for the week-end (saturday/sunday).
The following code is not working, i'm still received the local notification on saturday / sunday when the app is closed or in the background :
if(await LocalNotificationCenter.Current.AreNotificationsEnabled()==false){await LocalNotificationCenter.Current.RequestNotificationPermission();}
LocalNotificationCenter.Current.NotificationReceiving =(request)=>{varisWeekend= DateTime.Now.DayOfWeek == DayOfWeek.Sunday || DateTime.Now.DayOfWeek == DayOfWeek.Saturday;return Task.FromResult(new NotificationEventReceivingArgs{Handled=isWeekend,Request=request});};varnotification=new NotificationRequest
{NotificationId=100,Title="My Title",Description=$"My description",Schedule={NotifyTime= DateTime.Now.AddSeconds(15),// Used for Scheduling local notification, if not specified notification will show immediately.RepeatType= NotificationRepeat.Daily
}};await LocalNotificationCenter.Current.Show(notification);
Any idea please ?
Thanks
Platform (please complete the following information):
XF 5.0.0.244
Plugin.LocalNotification 10.1.8
Smartphone (please complete the following information):
Device: iPhone 13 mini
OS: iOS 16.6
The text was updated successfully, but these errors were encountered:
PauchardThomas
changed the title
iOS NotificationReceiving not fired when app is in background
iOS NotificationReceiving not fired when app is not in foreground
Aug 11, 2023
Describe the bug
Hello,
On iOS, NotificationReceiving is not fired when app is not in foreground...
I would like to show a local notification at 10:00 am each day except for the week-end (saturday/sunday).
The following code is not working, i'm still received the local notification on saturday / sunday when the app is closed or in the background :
Any idea please ?
Thanks
Platform (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: