Contrary to Apple documentation, [NSSavePanel savePanel] seems like it can return nil when called from a sandboxed macOS app that lacks the com.apple.security.files.user-selected.read-write entitlement. This causes a panic in objc2-app-kit:
unexpected NULL returned from +[NSSavePanel savePanel]
While Apple's documentation doesn't mention this, NSSavePanel.savePanel silently returns nil when the app is sandboxed but only has read-only file access entitlement instead of read-write. This has been discovered in the Apple Developer Forums:
https://developer.apple.com/forums/thread/104913
Here are examples of the panic happening in Ruffle:
https://github.com/ruffle-rs/ruffle/issues?q=is%3Aissue%20state%3Aopen%20%22unexpected%20NULL%20returned%20from%22
Contrary to Apple documentation,
[NSSavePanel savePanel]seems like it can returnnilwhen called from a sandboxed macOS app that lacks thecom.apple.security.files.user-selected.read-writeentitlement. This causes a panic in objc2-app-kit:unexpected NULL returned from +[NSSavePanel savePanel]
While Apple's documentation doesn't mention this,
NSSavePanel.savePanelsilently returnsnilwhen the app is sandboxed but only hasread-onlyfile access entitlement instead ofread-write. This has been discovered in the Apple Developer Forums:https://developer.apple.com/forums/thread/104913
Here are examples of the panic happening in Ruffle:
https://github.com/ruffle-rs/ruffle/issues?q=is%3Aissue%20state%3Aopen%20%22unexpected%20NULL%20returned%20from%22