I'm developing a Share Extension for a macOS Electron application that allows users to share files from Finder to our application using the system Share menu. The extension compiles, signs, and notarizes successfully, but crashes during initialization due to sandbox restrictions blocking hid-control operations required by NSApplication.
The Share Extension crashes during initialization with the following sandbox violation:
Process: ShareExtension [pid]
Identifier: com.xxxxxxxxxxxx.xxxxxxxxx.extension
Operation: hid-control
I would appreciate guidance on:
- The proper entitlements for third-party Share Extensions with App Sandbox
- Alternative approaches if Share Extensions have fundamental limitations for third-party developers
- Any documentation or sample code demonstrating Share Extensions outside the App Store