electron-releases
electron-releases copied to clipboard
Application quit unexpected: EXC_CORPSE_NOTIFY Namespace SIGNAL, Code 5 Trace/BPT trap: 5
I'm using electron-builder to build and sign my application. But if I enable sandbox in entitlements for Mac App Store publish then my app won't work. I have tried to re-sign with codesign, and I can confirm that it only work when sign without sandbox key.
- 1st attempt is without entitlement file contain sandbox key:
Command line: codesign -s "Apple Distribution: Block Browser INC (Y4NZxxxxxx)" --force --deep --sign - dist/mac-universal/BLOCK.app
Then BLOCK.app run normal.
- 2nd attempt is with entitlement file contain sandbox key:
Command line: codesign --entitlements build/entitlements.mac.plist -s "Apple Distribution: Block Browser INC (Y4NZxxxxxx)" --force --deep --sign - dist/mac-universal/BLOCK.app
entitlements.mac.plist:
<!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/>
</plist>
Then BLOCK.app quit unexpected. Error file: error.log
-
3rd attempt is with entitlement file and comment sandbox key:
Command line:
codesign --entitlements build/entitlements.mac.plist -s "Apple Distribution: Block Browser INC (Y4NZxxxxxx)" --force --deep --sign - dist/mac-universal/BLOCK.app
entitlements.mac.plist:
<!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/>
</plist>
Then BLOCK.app run normal.
Packages version:
-
devDependencies:
- electron: 27.0.2+wvcus
- electron-builder: 24.6.4
-
dependencies:
- "@sentry/cli": "^2.21.2",
- "@sentry/electron": "^4.14.0",
- "@sentry/webpack-plugin": "^2.9.0",
- "electron-updater": "^6.1.4",
- "electron-store": "^8.1.0",
- "electron-context-menu": "^3.6.1",
- "v8-compile-cache": "^2.4.0"
Build settings:
"appId": "xxxxxx.block.mac",
"category": "public.app-category.utilities",
"provisioningProfile": "./embedded.provisionprofile",
"target": [
{
"target": "pkg",
"arch": ["universal"]
}, {
"target": "dmg",
"arch": ["universal"]
}
],
"icon": "build/icons/icon.icns",
"bundleVersion": "11"
},
Following #105, so I have after pack hook:
"afterPack": "./afterPackHook.js",
afterPackHook.js:
const fs = require('fs')
exports.default = async function(context) {
try{
fs.unlinkSync(context.appOutDir + '/BLOCK.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Electron Framework.sig');
} catch(e){}
}
ECS does not support packaging for the App Store. It also relies on features not allowed by by the store guidelines, and would not pass the review.
Thank you for your reply @khwaaj, so is there any possible way to publish app to mac store?
No, unfortunately there is not. There are some old tickets where this has been extensively discussed before, which you can probably find if you want some more information.