Skip to content

Commit

Permalink
[AppKit] Fix missing Notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexsoto committed Dec 8, 2021
1 parent 849cf7a commit ff07707
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
5 changes: 0 additions & 5 deletions src/AppKit/Compat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,5 @@ public static class NSFileTypeForHFSTypeCode
public static readonly string DesktopIcon = "desk";
public static readonly string FinderIcon = "FNDR";
}

public partial class NSApplication {
public static NSString ProtectedDataWillBecomeUnavailableNotification => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public static NSString ProtectedDataDidBecomeAvailableNotification => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
}
}
#endif // !NET
15 changes: 7 additions & 8 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -813,14 +813,13 @@ interface NSApplication : NSAccessibilityElementProtocol, NSUserInterfaceValidat
[Notification, Field ("NSApplicationDidChangeScreenParametersNotification")]
NSString DidChangeScreenParametersNotification { get; }

// https://github.com/xamarin/xamarin-macios/issues/13185
// [Mac (12,0)]
// [Field ("NSApplicationProtectedDataWillBecomeUnavailableNotification")]
// NSString ProtectedDataWillBecomeUnavailableNotification { get; }

// [Mac (12,0)]
// [Field ("NSApplicationProtectedDataDidBecomeAvailableNotification")]
// NSString ProtectedDataDidBecomeAvailableNotification { get; }
[Notification, Mac (12,1)]
[Field ("NSApplicationProtectedDataWillBecomeUnavailableNotification")]
NSString ProtectedDataWillBecomeUnavailableNotification { get; }

[Notification, Mac (12,1)]
[Field ("NSApplicationProtectedDataDidBecomeAvailableNotification")]
NSString ProtectedDataDidBecomeAvailableNotification { get; }

[Field ("NSApplicationLaunchIsDefaultLaunchKey")]
NSString LaunchIsDefaultLaunchKey { get; }
Expand Down

0 comments on commit ff07707

Please sign in to comment.