The Program ID
The Program ID is a unique identifier for your add-on. When you package your
add-on for distribution using cfx xpi
, it will become the
ID field in the add-on's Install Manifest.
The ID is used for a variety
of purposes. For example: addons.mozilla.org uses
it to distinguish between new add-ons and updates to existing add-ons, and the
simple-storage
module uses it
to figure out which stored data belongs to which add-on.
It is read from the id
key in your add-on's package.json
file.
cfx init
does not create this key, so if you don't set it yourself, the
first time you execute cfx run
or cfx xpi
, then cfx
will create an
ID for you, and will show a message like this:
No 'id' in package.json: creating a new ID for you. package.json modified: please re-run 'cfx run'
The ID generated by cfx
in this way is a randomly-generated string, but
you can define your own ID by editing the package.json
file
directly. In particular, you can use the extensionname@example.org
format
described in the
Install Manifest documentation.
However, you can't use the
GUID-style format.