desktop: Change macOS sandbox entitlement to allow file saving #22776
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The read-only entitlement only permits opening files via NSOpenPanel. The read-write entitlement additionally permits saving files via NSSavePanel, which is required for Flash content using FileReference.save().
Without read-write, macOS silently returns nil from [NSSavePanel savePanel] in sandboxed apps, causing a panic in the objc2-app-kit bindings.
See: https://developer.apple.com/forums/thread/104913
Fixes #22771
Fixes #22753
Fixes #22215
Fixes #21756
Fixes #21162
Fixes #20629
Fixes #20508
Fixes #19827
Fixes #19604
Fixes #19515
Fixes #19074
Fixes #17844
Fixes #22892
NOTE: This is currently untested, I am working on reproducing the panic and verifying that this is actually the cause, but all the evidence seems to suggest that it is.