Mobile notification

Any one can show me some sample of IOS notification. I set up a simple like this. But nothing happen. No error alert.

var timeTrigger = new iOSNotificationTimeIntervalTrigger()
        {
            TimeInterval = delivery_time.TimeOfDay,
            Repeats = false
        };

        var notification = new iOSNotification()
        {
            // You can specify a custom identifier which can be used to manage the notification later.
            // If you don't provide one, a unique string will be generated automatically.
            Identifier = _Identifier,
            Title = "Hey! Come back to fight.",
            Body = offlineCall[UnityEngine.Random.Range(0, offlineCall.Length)],
            Subtitle = "Come back to fight",
            ShowInForeground = true,
            ForegroundPresentationOption = (PresentationOption.Alert | PresentationOption.Sound),
            CategoryIdentifier = "category_a",
            ThreadIdentifier = "thread1",
            Trigger = timeTrigger,
        };

        iOSNotificationCenter.ScheduleNotification(notification);

You have to request users permission to send notifications and this request must not include Provisional flag, otherwise they will work silently, but nothing shows up in UI.
For the simplest solution, go to Project Settings window and in notifications tab select the checkbox for asking for permission on startup and make sure Provisional flag is not set.

At Project Setting I had set like here

8427177--1115508--upload_2022-9-9_14-24-27.png

Click on that “Mixed” drop down and make sure Provisional is not selected in there.

1 Like

thks. I check it again and sure it dont selected

8427186--1115511--upload_2022-9-9_14-27-20.png