I am using MAUI and trying to display the local notification on iPhone, but it doesn't show notification neither it throws any error. However, the same code is working fine on Android. I have already added UseLocalNotification() in MauiProgram.cs
//Send Push Notication
var request = new NotificationRequest
{
Image = new NotificationImage { ResourceName = "icon.png", FilePath = "/Assets/icon.png" },
NotificationId = 1000,
Title = "Changed",
Subtitle = "Tab to see..",
Description = $"updated",
BadgeNumber = 50, //42
Schedule = new NotificationRequestSchedule
{
NotifyTime = DateTime.Now.AddSeconds(1),
// NotifyRepeatInterval = TimeSpan.FromDays(1),
}
};
await LocalNotificationCenter.Current.Show(request);
Here is code for local notification on iPhone. But you need permission to do this from the user. Asking permission to use notifications