- Home /
Question by
Gunghohoho · Oct 13, 2016 at 10:54 AM ·
iosmobile
What is the roadmap for iOS 10 Notification features (i.e. rich notification such as UNNotificationContent)?
UILocalNotification is deprecated in iOS 10.
LocalNotification is still working in my project. However, I would like to incorporate some of the new notification features into my game. Specifically, pulling down the banner notification will have additional buttons appear.
if (UnityEngine.iOS.NotificationServices.enabledNotificationTypes == UnityEngine.iOS.NotificationType.None) {
UnityEngine.iOS.NotificationServices.RegisterForNotifications (
UnityEngine.iOS.NotificationType.Alert|
UnityEngine.iOS.NotificationType.Badge|
UnityEngine.iOS.NotificationType.Sound);
}
UnityEngine.iOS.NotificationServices.ClearLocalNotifications ();
UnityEngine.iOS.LocalNotification notif = new UnityEngine.iOS.LocalNotification ();
notif.fireDate = DateTime.Now.AddSeconds (10);
notif.alertBody = "Hello!";
notif.hasAction = true;
notif.alertAction = "Alert";
UnityEngine.iOS.NotificationServices.ScheduleLocalNotification (notify);
My sample code above is able to display a notification on iPhone devices (tested on iOS 9 and iOS 10). However, notif.hasAction and notify.alertAction has no effect on the iOS 10 device's notification.
Need help please. Thank you.
Comment
Your answer
Follow this Question
Related Questions
Rotate model with ARKit 0 Answers
What do I need to build and publish for Android and iOS 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Antialiasing on iOS 1 Answer
Graphics Emulation - OpenGL 3 1 Answer