Skip to content
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

10.1.6 Notification are not generated either on Real Phones nor Simulators iOS #427

Closed
samirgcofficial opened this issue Jun 27, 2023 · 2 comments
Assignees
Labels
bug Something isn't working iOS iOS only issue

Comments

@samirgcofficial
Copy link

Describe the bug
Android works fine but iOS Tested on real phones and simulators notification not received.

To Reproduce
Brand new .Net7 project add Plugin.LocalNotification
`if (await LocalNotificationCenter.Current.AreNotificationsEnabled() == false)
{
await LocalNotificationCenter.Current.RequestNotificationPermission();
}

    var notification = new NotificationRequest
    {
        NotificationId = 100,
        Title = "Test",
        Description = "Test Description",
        ReturningData = "Dummy data", // Returning data when tapped on notification.
        Schedule =
        {
            NotifyTime = DateTime.Now.AddSeconds(2) // Used for Scheduling local notification, if not specified notification will show immediately.
        }
    };
    await LocalNotificationCenter.Current.Show(notification);`

And of course use this :
.UseLocalNotification()

Getting this output on simulator :

Plugin.LocalNotification.LocalNotificationCenter: Error: WillPresentNotification:

System.NullReferenceException: Object reference not set to an instance of an object.
at Plugin.LocalNotification.Platforms.UserNotificationCenterDelegate.WillPresentNotification(UNUserNotificationCenter center, UNNotification notification, Action`1 completionHandler)

Sample : http://xamaringuyshow.com/wp-content/uploads/2023/06/iOSlatestNotWorking.zip

@samirgcofficial samirgcofficial added the bug Something isn't working label Jun 27, 2023
@thudugala thudugala added the iOS iOS only issue label Jun 27, 2023
@thudugala
Copy link
Owner

@samirgcofficial please try version 10.1.7

@samirgcofficial
Copy link
Author

It works thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working iOS iOS only issue
Projects
None yet
Development

No branches or pull requests

2 participants