Skip to content

Conversation

@SuchAFuriousDeath
Copy link
Collaborator

@SuchAFuriousDeath SuchAFuriousDeath commented Jan 15, 2026

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.

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 ruffle-rs#22771

Fixes ruffle-rs#22753

Fixes ruffle-rs#22215

Fixes ruffle-rs#21756

Fixes ruffle-rs#21162

Fixes ruffle-rs#20629

Fixes ruffle-rs#20508

Fixes ruffle-rs#19827

Fixes ruffle-rs#19604

Fixes ruffle-rs#19515

Fixes ruffle-rs#19074

Fixes ruffle-rs#17844
@danielhjacobs danielhjacobs added A-desktop Area: Desktop Application macos Issues related to MacOS T-fix Type: Bug fix (in something that's supposed to work already) labels Jan 15, 2026
@madsmtm
Copy link
Contributor

madsmtm commented Jan 15, 2026

I vaguely recall having similar problems with another project in the past, +1 on changing the entitlement to read/write.

@kjarosh
Copy link
Member

kjarosh commented Jan 15, 2026

Would be nice if someone tested whether this fixes the linked issues

@SuchAFuriousDeath
Copy link
Collaborator Author

SuchAFuriousDeath commented Jan 15, 2026

I will, I just don't have a Mac available directly in my possession, but I have some ways to get access to one, just give me a couple of days.

@adrian17 adrian17 added the waiting-on-author Waiting on the PR author to make the requested changes label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-desktop Area: Desktop Application macos Issues related to MacOS newsworthy T-fix Type: Bug fix (in something that's supposed to work already) waiting-on-author Waiting on the PR author to make the requested changes

Projects

None yet

6 participants