Package and ship
Set application metadata
Give the package a stable name, version, description, author, and identifier before producing distributable files.
The operating system needs to know who your app is. So do the signing system, the update service, and the userData folder we chose earlier. All of them read the application’s identity. Set it now, before the first public build, because changing it later is painful.
package.json
Open package.json and replace the generated placeholders:
nameis the package-safe internal name, lowercase, no spaces:desktop-notesproductNameis what humans see:Desktop Notesversionfollows semantic versioning:1.0.0descriptionandauthorshould be accurate, because makers copy them into installer metadata
forge.config.js
The application identifier lives in the packager configuration:
module.exports = {
packagerConfig: {
name: 'Desktop Notes',
appBundleId: 'com.flaviocopes.desktopnotes'
},
makers: [
// generated makers stay here
]
}
appBundleId is the macOS bundle identifier. Reverse-domain style, unique to you, chosen once. macOS uses it to tell your app apart from every other app, and signing, notarization, permissions, and updates all key off it. Change it and macOS treats the result as a brand-new application.
One identity map
I like to write the identity down in one place so nothing drifts:
| Field | Purpose |
|---|---|
name | Package-safe internal name |
productName | Human-readable application name |
version | Release version |
appBundleId | Stable macOS application identifier |
| Windows application identity | Installer and upgrade continuity |
The Windows identifier is the odd one out. It depends on the maker: the Squirrel maker, for example, has its own options for the application name and the installer identity. Configure it in that maker’s config. Don’t assume appBundleId covers Windows, because it doesn’t.
Check the result
Build once with npm run package and inspect the output under out/. Look at the application name, the executable name, the metadata the operating system shows in Get Info or Properties, and the userData folder the packaged app uses. They should all say Desktop Notes, consistently. A mismatch here usually means one field is still a generated placeholder.
Versions are immutable
Bump version for every release, even a tiny fix. Never rebuild different code and ship it under the same version number. Update clients compare versions to decide whether to download. Your support logs will say “1.0.3”, and you need that to mean exactly one build. Once a version is out, it’s frozen.
Lesson completed