Fix warning message on Mac about secure coding not enabled#1231
Conversation
- See eclipse-platform#1228 - 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." - As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class - However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See eclipse-equinox/equinox#630 - This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse
lshanmug
left a comment
There was a problem hiding this comment.
@Phillipus Changes look good. Should we merge for 4.32 RC1?
@lshanmug The But as mentioned above, equinox project also need to apply a fix in their native Mac code. I create a PR for that case here. |
Yes, the selector code will not be called for earlier versions.
The SWT PR can go in anyways, correct? |
Yes, I think so. If Eclipse is started with the One thing I don't understand is where is the singleton |
|
…clipse-platform#1231)" - This can cause a crash to desktop
…latform#1231) - See eclipse-platform#1228 - 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." - As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class - However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See eclipse-equinox/equinox#630 - This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse
See [Mac Sonoma] "WARNING: Secure coding is not enabled for restorable state" warning message #1228
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."
As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class
However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See [Mac Sonoma] "WARNING: Secure coding is not enabled for restorable state" warning message eclipse-equinox/equinox#630
This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse