Skip to content

Commit

Permalink
For macOS, support applicationSupportsSecureRestorableState to avoid …
Browse files Browse the repository at this point in the history
…warning on modern macOS (12+), Intel-based platforms. Thanks Juan for the hint!
  • Loading branch information
marceltaeumel committed Dec 11, 2023
1 parent 1b15c7e commit 833bc12
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
return NSTerminateCancel;
}

- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)sender {
// macOS 12.0+
// We do not handle save/restore ourselves. Thus, it is fine to let
// the operating system handle it securely.
// See https://sector7.computest.nl/post/2022-08-process-injection-
// breaking-all-macos-security-layers-with-a-single-vulnerability/
return YES;
}

- (void) initializeTheWindowHandler {
[windowHandler mainViewOnWindow: self.mainView];
self.mainView.windowLogic = windowHandler;
Expand Down

1 comment on commit 833bc12

@marceltaeumel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this fix also benefits ARMv8 users on macOS 12+, not just Intel-based Macs.

Please sign in to comment.