File system location
nRF Connect stores apps in the following directory:
Official apps are uploaded to
developer.nordicsemi.com. When clicking on
Install in the launcher, the app tarball is downloaded from
developer.nordicsemi.com and extracted to
Apps that are unofficial or in development are retrieved from the
.nrfconnect-apps/local directory. Adding an app here will make it appear in
the nRF Connect launcher, so that you can test it.
Properties in package.json
The following package.json properties should be configured by nRF Connect apps:
|The name used to identify the app. The recommended naming convention is
pc-nrfconnect-<appname>, as this makes it easier to identify it as an nRF Connect app.
|The name shown in the nRF Connect launcher and in the app’s window title.
|The description shown in the nRF Connect launcher.
|The current version of the app. Should be a valid semver string. The nRF Connect launcher will display an upgrade button when new versions of the app are made available on the server.
|The entry file of the app, which is loaded by nRF Connect. When using a bundler like
esbuild, this should point to the created bundle file, typically in the dist/ directory.
|The nRF Connect version(s) the app supports. Should be a valid semver range. The launcher will show a warning if this is missing or incompatible.
|The files to include when publishing the app on the npm registry. Make sure that this contains everything the app needs at runtime, e.g. code, icon, and resources.
Other than these, we also recommend setting at least
If there is an
icon.png file in the app directory, then this will appear next
to the app in the nRF Connect launcher and in the app’s window title. The
default nRF Connect icon is used if no such file exists.
The icon is displayed at 40x40 pixels in the nRF Connect launcher, so make sure the icon is displaying nicely at that size.
Usually, apps will depend on other modules from the npm registry. Dependencies can be specified in the app’s package.json file.
As a general rule, apps should use
devDependencies instead of
when possible. This will keep the app’s size to a minimum. At build time,
esbuild will bundle all the code that the app needs to run, so the dependencies
are normally only needed at build time.
Some modules may not be possible to bundle with esbuild. This could be native
modules or modules that use some special syntax that esbuild does not support.
In this case, the module should be added to
dependencies instead of
devDependencies, and also added to
bundledDependencies so that it is
included in the tarball that is published to npm.
pc-nrfconnect-shared provides a script
esbuild with a configuration that is ready to use. The
nRF Connect boilerplate app defines
scripts to run
to build the app.
Normally, app developers should not need to edit this, but you are free to bundle apps in another way if that suits you better.
Apps can import a few modules from nRF Connect.
esbuild configuration ignores these by adding them as
as they are available at runtime. The same is automatically done for any
dependencies from package.json.
All official apps should have a file
npm run nordic-publish it is automatically uploaded to
developer.nordicsemi.com and the users see it in the launcher as release notes
of the app.