I In my application, I arranged the notifications call as follows:
using LocalNotification = UnityEngine.iOS.LocalNotification;
using NotificationServices = UnityEngine.iOS.NotificationServices;
using NotificationType = UnityEngine.iOS.NotificationType;
public class MyClass : MonoBehaviour {
void Start (){
var notif = new LocalNotification();
notif.fireDate = DateTime.Now.AddSeconds(10);
notif.alertBody = "Hello!";
notif.applicationIconBadgeNumber = 1;
NotificationServices.ScheduleLocalNotification(notif);
}}
For this I referred to the following source: https://docs.unity3d.com/ScriptReference/iOS.LocalNotification.html
However, I didn’t understand for what exactly we need the following variables:
notif.alertLaunchImage
notif.soundName // if I got it right, this variable is responsible for the notification sound changes. But I couldn’t change the sound anyway.
notif.alertAction
notif.hasAction
notif.userInfo
Could you, please, show me by example how to use these variables?