Releasing an Electron app on the Mac App Store

The build process.

{ // ... name, description, dependencies, ect "build": {
"appId": "com.flaque.penguin",
"mac": {
"category": "public.app-category.graphics-design",
"target": [
"pkg",
"dmg",
"zip",
"mas"
],
"entitlements": "build/entitlements.mac.plist",
"type": "distribution",
"icon": "build/icon.icns"
},
"mas": {
"entitlements": "build/entitlements.mas.plist",
"type": "distribution",
"category": "public.app-category.graphics-design"
},
"files": [
"main.js",
"node_modules/**/*",
"app/**/*",
"package.json",
"embedded.provisionprofile"
]
}
}

Entitlements and the File Structure

<?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.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</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>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<string>F29L6XF84H.com.flaque.penguin</string>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</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>
<key>com.apple.developer.team-identifier</key>
<string>F29L6XF84H</string>
<key>com.apple.application-identifier</key>
<string>F29L6XF84H.com.flaque.penguin</string>
</dict>
</plist>
The icon for my app.

The Provisioning Profile.

Code Signing

  • Mac Developer
  • Mac App Distribution
  • Mac Installer Distribution
  • Developer ID Application
  • Developer ID Installer

Setting up scripts

"scripts": {
"dist": "node_modules/.bin/build",
"release": "bash scripts/publish_penguin.sh",
/* other stuff */
}

Releasing!

--

--

--

Developer of a bunch of things.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Evan Conrad

Evan Conrad

Developer of a bunch of things.

More from Medium

Choosing Your Next Headless CMS? Keep an Eye on Directus 9.

Step-By-Step: Manage Your Website Translations Like a Pro Using FlyCode

How to Install a .IPA file using the CLI on macOS?

Article image

My MacBook setup for web development 2022