App sandbox not enabled (ITMS-90296): For other binaries to be signed
See original GitHub issueError
ERROR ITMS-90296: “App sandbox not enabled. The following executables must include the “com.apple.security.app-sandbox” entitlement with a Boolean value of true in the entitlements property list: [( “com.warrenbuckley.compact.logviewer.pkg/Payload/Compact Log Viewer.app/Contents/Resources/LogViewer.Server/bin/dist/osx/LogViewer.Server” )] Refer to App Sandbox page at https://developer.apple.com/devcenter/mac/app-sandbox/ for more information on sandboxing your app.”
Background
I am currently trying to submit a MacOS app to the app store for submission and have been successful. However I forgot to include my self hosted API/Server binary/executable that is needed to be run in order for my Electron app to work.
I am using electron-osx-sign as part of https://github.com/electron-userland/electron-builder and have the following configuration setup for this and I have included the binary path in order for it be signed as well.
So these entitlements and configuration listed below minus the binary option in the JSON config has all worked and has been approved by Apple - I just don’t have a fully working app 🙈
So by including the binary option it fails this pre-validation by Apple with its Application Loader
program.
Electron Builder Config
{
"appId": "com.warrenbuckley.compact.logviewer",
"productName": "Compact Log Viewer",
"directories": {
"output": "../output"
},
"files": [
"!**/.vscode",
"!tsconfig.json",
"!tslint.json"
],
"extraResources": {
"from": "../LogViewer.Server/bin/dist/",
"to": "LogViewer.Server/bin/dist/",
"filter": [
"**/*"
]
},
"win": {
"target": [
"nsis",
"appx"
],
"icon": "logo.png"
},
"mac": {
"category": "public.app-category.developer-tools",
"target": [
"dmg",
"mas"
],
"bundleVersion": 20190426,
"icon": "logo.png",
"provisioningProfile": "Compact_Log_Viewer_App__Mac_Production_Profile.provisionprofile"
},
"nsis": {
"deleteAppDataOnUninstall": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "Compact Log Viewer",
"artifactName": "Compact.Log.Viewer.Setup.${version}.${ext}",
"uninstallDisplayName": "Compact Log Viewer (${version})"
},
"appx": {
"applicationId": "Compact.Log.Viewer",
"backgroundColor": "#3544b1",
"displayName": "Compact Log Viewer",
"identityName": "64819WarrenBuckley.CompactLogFormatViewer",
"publisher": "CN=4629CEC3-93A2-4080-86C0-63487B897B1F",
"publisherDisplayName": "Warren Buckley"
},
"dmg": {
"backgroundColor": "#3544b1"
},
"mas": {
"binaries": [
"../LogViewer.Server/bin/dist/osx/LogViewer.Server"
]
}
}
Entitlements.mas.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>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
Entitlements.mas.inherit.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>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (4 by maintainers)
Top GitHub Comments
Workaround Add
to node_modules/app-builder-lib/templates/entitlements.mac.plist
when I did like this, the built app crashes