This document outlines the distribution and code signing approach for this Electron application. This strategy balances cost-effectiveness with user trust and update capabilities.
- Platforms: Windows, macOS
- Update Method: electron-updater with auto-updates
- Frequency: As needed for bug fixes and features
- Advantage: Immediate releases, no review process
- Platform: Windows only
- Store Link: Compose Booster on Microsoft Store
- Update Method: Microsoft Store managed updates
- Frequency: Major releases and significant updates
- Advantage: Microsoft-signed, no SmartScreen warnings
- Platform: macOS only
- Update Method: Mac App Store managed updates
- Frequency: Major releases and significant updates
- Advantage: Apple-signed, sandboxed, trusted distribution
- Signing: UNSIGNED
- Approach: Reputation-based trust
- Format: NSIS installer (.exe)
- Auto-Updates: Enabled via electron-updater
- User Experience:
- Initial installation shows SmartScreen warning
- Users must click "More info" → "Run anyway"
- Over time, reputation builds and warnings decrease
- Signing: Signed by Microsoft during submission process
- Format: MSIX package
- Auto-Updates: DISABLED (Store manages updates)
- User Experience:
- No security warnings
- Automatic updates via Store
- Sandboxed environment
- Signing: SIGNED with Apple Developer certificate
- Developer Account: Apple Developer Program ($99/year)
- Certificate Type: Developer ID Application
- Notarization: Required and enabled
- Format: DMG installer
- Auto-Updates: Enabled via electron-updater
- User Experience: No security warnings
- Signing: Signed with Apple Distribution certificate
- Format: .app bundle (submitted via Transporter)
- Auto-Updates: DISABLED (App Store manages updates)
- Sandbox: Required - app runs in sandboxed environment
- Entitlements: Restricted set for MAS compliance
- User Experience:
- No security warnings
- Automatic updates via App Store
- Sandboxed environment
Multiple build configurations are maintained:
-
GitHub Build (via Electron Forge)
- Windows: Squirrel installer, unsigned
- macOS: DMG or ZIP, signed and notarized
- Auto-updater: ENABLED
-
Microsoft Store Build (via Electron Forge MakerAppX)
- Windows: APPX/MSIX package
- Auto-updater: DISABLED
- Store-specific metadata and capabilities
-
Mac App Store Build (via Electron Forge)
- macOS: .app bundle for MAS submission
- Auto-updater: DISABLED
- Sandboxed with MAS entitlements
- Submitted via Apple Transporter
# Build for GitHub (Windows)
npm run make # Uses Squirrel maker
# Build for GitHub (macOS)
npm run make # Uses DMG/ZIP maker
# Build for Microsoft Store
npm run make -- --targets=@electron-forge/maker-appx
node scripts/fix-appx-manifest.js # Fix manifest for Store
# Build for Mac App Store
npm run make:mas # MAS-specific build (TBD)The application detects its distribution channel at runtime:
function getDistributionChannel() {
// Microsoft Store detection (Windows)
if (process.windowsStore ||
(process.platform === 'win32' && process.execPath.includes('WindowsApps'))) {
return 'microsoft-store';
}
// Mac App Store detection (macOS)
if (process.mas ||
(process.platform === 'darwin' && process.execPath.includes('/Applications/') &&
process.execPath.includes('sandboxed'))) {
return 'mac-app-store';
}
return 'direct-download';
}// Auto-updater is only initialized for GitHub distributions
if (shouldEnableAutoUpdater()) {
const { autoUpdater } = require('electron-updater');
autoUpdater.checkForUpdatesAndNotify();
}- Type: Individual
- Status: ACTIVE
- Cost: $99/year
- Purpose:
- Code signing for macOS GitHub builds (Developer ID Application)
- Notarization service for GitHub distribution
- Mac App Store submission (Apple Distribution certificate)
- App Store Connect access
- Type: Individual
- Status: ACTIVE
- Cost: $19 one-time registration fee
- Purpose:
- Publish Windows APPX/MSIX packages
- Microsoft-provided code signing
- Store-managed update distribution
- Partner Center access
project/
├── build/
│ ├── entitlements.mac.plist # macOS entitlements
│ └── icon.png # App icon
├── scripts/
│ ├── notarize.js # macOS notarization script
│ └── build-all.js # Multi-platform build script
├── src/
│ ├── main/
│ │ ├── main.js # Main process
│ │ └── utils/
│ │ └── distribution.js # Distribution detection
│ └── renderer/
├── electron-builder.github.json # GitHub build config
├── electron-builder.store.json # MS Store build config
└── package.json
Accepted Trade-offs:
- Users see SmartScreen warnings initially
- Requires user action to approve installation
- No immediate trust from antivirus software
Mitigations:
- Clear installation instructions on GitHub
- Screenshots showing how to bypass SmartScreen
- Reputation builds over time with download count
- Microsoft Store provides signed alternative
Cost Analysis:
Traditional Windows Code Signing: $100-400/year
Azure Trusted Signing: $120/year
Microsoft Store (individual): $19 one-time
Selected Approach for Windows:
- GitHub: $0/year (unsigned)
- MS Store: $19 one-time (Microsoft signs)
Total: $19 one-time
macOS has no free alternative:
- Apple Developer Program required: $99/year
- Notarization mandatory for distribution outside App Store
- Users cannot easily install unsigned apps (since macOS Catalina)
- Developer tags new version (e.g.,
v1.2.0) - GitHub Actions builds and signs macOS, builds Windows unsigned
- Releases published to GitHub with auto-generated notes
- electron-updater checks GitHub Releases API
- Users prompted to download and install updates
- macOS: Updates install seamlessly (signed)
- Windows: SmartScreen appears but less frequently for known app
- Developer submits APPX/MSIX package via Partner Center
- Microsoft reviews (usually 1-3 days)
- Store signs package with Microsoft certificate
- Users receive automatic updates via Store
- No user action required
- Developer builds MAS package with Apple Distribution certificate
- Submit via Apple Transporter or Xcode
- Apple reviews (usually 1-3 days, can take longer)
- App signed and distributed via Mac App Store
- Users receive automatic updates via App Store
- No user action required
- Register Apple Developer account ($99/year)
- Register Microsoft Store developer account ($19 one-time)
- Configure Electron Forge for APPX builds
- Create fix-appx-manifest.js script for Store submission
- Submit to Microsoft Store and get approval - APPROVED! ✅
- Generate Developer ID Application certificate
- Configure code signing in Electron Forge
- Set up notarization script
- Test signed/notarized build
- Generate Apple Distribution certificate
- Create provisioning profile
- Configure MAS build in Electron Forge
- Create entitlements.mas.plist for sandbox
- Submit to Mac App Store and get approval
- Implement distribution detection logic
- Integrate electron-updater for GitHub builds
- Disable auto-updater for store builds
- Test auto-updater on both platforms
- Update version in
package.json - Create git tag (v1.0.0)
- Build and test all distribution packages
- Create GitHub release with assets
- Submit to Microsoft Store via Partner Center - APPROVED! ✅
- Submit to Mac App Store via App Store Connect (pending)
- Test updates on all distribution channels
APPLE_ID=your-apple-id@email.com
APPLE_ID_PASSWORD=app-specific-password
APPLE_TEAM_ID=YOUR10CHARS
CSC_LINK=base64-encoded-certificate.p12
CSC_KEY_PASSWORD=certificate-password
GH_TOKEN=github-personal-access-token# Usually configured via electron-builder.store.json
# Publisher info obtained from Microsoft Partner CenterInclude clear instructions for Windows users:
### Windows Installation
**Important**: Windows SmartScreen may show a warning on first install.
1. Download the latest `.exe` from [Releases](releases)
2. Run the installer
3. If you see "Windows protected your PC":
- Click "More info"
- Click "Run anyway"
4. This is normal for new unsigned applications
5. Alternatively, install from [Microsoft Store](link) for a warning-free experienceUI should clearly communicate:
- Update availability
- Download progress (for GitHub version)
- Installation prompts
- Store-managed updates (for Store version)
Consider upgrading to:
- Windows: Azure Trusted Signing ($120/year) for GitHub builds
- Business Entity: DBA or LLC if liability protection needed
- EV Certificate: For instant trust ($300-500/year)
- GitHub release download counts
- Microsoft Store install/update metrics
- User reports of SmartScreen issues
- Support requests related to installation
Total Annual Cost: $99/year (Apple Developer Program) One-time Cost: $19 (Microsoft Store registration)
Distribution Matrix:
| Platform | Channel | Signed | Auto-Update | Cost | Status |
|---|---|---|---|---|---|
| Windows | GitHub | No | Yes (electron-updater) | $0 | ✅ Live |
| Windows | MS Store | Yes (by MS) | Yes (by Store) | $19 one-time | ✅ Live |
| macOS | GitHub | Yes (notarized) | Yes (electron-updater) | $99/year | ✅ Live |
| macOS | Mac App Store | Yes (by Apple) | Yes (by Store) | Included in $99/year | ⏳ Pending |
This approach provides:
- Maximum reach through both direct download and app stores
- User choice between store-managed and direct updates
- Professional signing on all distribution channels
- Cost-effectiveness with shared Apple Developer membership