Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning message on Mac about secure coding not enabled #632

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phillipus
Copy link

@Phillipus Phillipus commented May 15, 2024

  • See [Mac Sonoma] "WARNING: Secure coding is not enabled for restorable state" warning message #630

  • On macOS 14 and later a warning message is written to console: "WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES."

  • This adds an NSApplicationDelegate that implements applicationSupportsSecureRestorableState

  • I don't know if the additional code could be better placed. Feedback welcome!

- See eclipse-equinox#630

- On macOS 14 and later a warning message is written to console:
"WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES."

- This adds an NSApplicationDelegate that implements applicationSupportsSecureRestorableState
@Phillipus Phillipus marked this pull request as ready for review May 15, 2024 11:33
Copy link

Test Results

  660 files  +  220    660 suites  +220   1h 11m 18s ⏱️ + 21m 49s
2 195 tests ±    0  2 148 ✅ +    1   47 💤  -  1  0 ❌ ±0 
6 729 runs  +2 243  6 586 ✅ +2 196  143 💤 +47  0 ❌ ±0 

Results for commit d15cb06. ± Comparison against base commit c4be7f2.

@HannesWell
Copy link
Member

@sravanlakkimsetti can you review this?

@Phillipus thank you for being pro-active on this topic. You can try out the executables/launcher-libraries archived in the Jenkins verification build to test if it has the desired effect.

@Phillipus
Copy link
Author

@Phillipus thank you for being pro-active on this topic. You can try out the executables/launcher-libraries archived in the Jenkins verification build to test if it has the desired effect.

@HannesWell Thanks for the heads up. I had already compiled and built the so file locally and tested it. But I also tested the one you refer to at Jenkins here. That does indeed have the desired effect.

@Phillipus
Copy link
Author

I'm not certain that setting an app delegate where I have set it in the PR is the right place. There are places that reference a an existing delegate:

NSObject *delegate = [[NSApplication sharedApplication] delegate];
if (delegate != NULL && [delegate respondsToSelector: @selector(application:openFiles:)]) {

NSObject *delegate = [[NSApplication sharedApplication] delegate];
if (delegate != NULL && [delegate respondsToSelector: @selector(application:openUrls:)]) {

- (void) handleOpenUrlsTimer: (NSTimer *) timer {
NSObject *delegate = [[NSApplication sharedApplication] delegate];

I'm not sure if setting a new delegate where I have might over-write a possibly existing one and then those functions might not work.

@Phillipus
Copy link
Author

I did a check, and at the point where this PR sets the AppDelegate it is NULL but I'm not sure where or if an AppDelegate is set somewhere else. @lshanmug can you advise?

@sravanlakkimsetti
Copy link
Member

@subyssurendran666 Can you please take a look?

Lets merge this after 4.32

@Phillipus
Copy link
Author

Don't merge this one without further investigation. The equivalent implementation in SWT caused a crash to desktop. See eclipse-platform/eclipse.platform.swt#1240

@HannesWell HannesWell marked this pull request as draft May 21, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants