Skip to content

Instantly share code, notes, and snippets.

@salomvary
Last active November 19, 2020 11:05
Show Gist options
  • Save salomvary/c8728f97d3ae916ea11129ebadf8b85f to your computer and use it in GitHub Desktop.
Save salomvary/c8728f97d3ae916ea11129ebadf8b85f to your computer and use it in GitHub Desktop.
Electron Entitlements for Mac App Store

These are the entitlements files I managed to build an Electron app for Mac App Store distribution.

Tested with Electron 8 on macOS Catalina and Mojave.

Used latest electron-builder for packaging (see package.json for configuration). Should work with other packaging tools but hardened runtime must be turned off.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Required entitlements -->
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<!-- Optional: add whatever specific entitlements your app needs here -->
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
{
"build": {
"mas": {
"hardenedRuntime": false
}
}
}
@Simon-Laux
Copy link

👍

@Timo-Linde
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment