From 1784b44cb60575a5e50b687ea7df30699ebb629b Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 19 Jun 2017 23:16:46 -0400 Subject: [PATCH] [UserNotifications] Update to Xcode 9 beta 1 --- src/usernotifications.cs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/usernotifications.cs b/src/usernotifications.cs index a79d4cd2b4..74b5d8c870 100644 --- a/src/usernotifications.cs +++ b/src/usernotifications.cs @@ -56,7 +56,9 @@ namespace XamCore.UserNotifications { public enum UNNotificationCategoryOptions : nuint { None = 0, CustomDismissAction = (1 << 0), - AllowInCarPlay = (2 << 0) + AllowInCarPlay = (2 << 0), + HiddenPreviewsShowTitle = (1 << 2), + HiddenPreviewsShowSubtitle = (1 << 3), } [Introduced (PlatformName.iOS, 10, 0)] @@ -114,6 +116,15 @@ namespace XamCore.UserNotifications { Alert = (1 << 2) } + [NoWatch, NoTV, iOS (11,0)] + [Native] + public enum UNShowPreviewsSetting : nint + { + Always, + WhenAuthenticated, + Never + } + [Introduced (PlatformName.iOS, 10, 0)] [Introduced (PlatformName.TvOS, 10, 0)] [Introduced (PlatformName.WatchOS, 3, 0)] @@ -257,9 +268,19 @@ namespace XamCore.UserNotifications { [Export ("options")] UNNotificationCategoryOptions Options { get; } + [NoWatch, iOS (11, 0)] + [Export ("hiddenPreviewsBodyPlaceholder")] + string HiddenPreviewsBodyPlaceholder { get; } + [Static] [Export ("categoryWithIdentifier:actions:intentIdentifiers:options:")] UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction [] actions, string [] intentIdentifiers, UNNotificationCategoryOptions options); + + [NoWatch, iOS (11,0)] + [Static] + [Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:")] + UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction[] actions, string[] intentIdentifiers, string hiddenPreviewsBodyPlaceholder, UNNotificationCategoryOptions options); + } [Introduced (PlatformName.iOS, 10, 0)] @@ -478,6 +499,10 @@ namespace XamCore.UserNotifications { [Unavailable (PlatformName.WatchOS)] [Export ("alertStyle")] UNAlertStyle AlertStyle { get; } + + [NoWatch, NoTV, iOS (11, 0)] + [Export ("showPreviewsSetting")] + UNShowPreviewsSetting ShowPreviewsSetting { get; } } [Introduced (PlatformName.iOS, 10, 0)]