How to create a new app for nRF Connect for Desktop
First make sure, all the needed prerequisites are met.
Create new app project
Choose a template for the new project: While you could start out with a blank Node.js project, we recommend to begin with
pc-nrfconnect-boilerplate. You could also begin with a more full fledged project like a
pc-nrfconnect-bleor a smaller one like
pc-nrfconnect-rssiand strip out what you do not need, but our recommendation is to just look at these for reference. If you choose something different than using
pc-nrfconnect-boilerplate, then adjust the next step accordingly.
~/.nrfconnect-apps/localdirectory. In a terminal on Linux/macOS or Git bash on Windows:
cd $HOME/.nrfconnect-apps/local git clone https://github.com/NordicSemiconductor/pc-nrfconnect-boilerplate.git pc-nrfconnect-myapp cd pc-nrfconnect-myapp rm -rf .git
If you prefer it, you can also create the project directory anywhere else and create a symbolic link from
~/.nrfconnect-apps/localto the project directory.
Modify relevant properties in
package.json. At least consider changing:
You now have everything set up for
everyday app development, so read up about that. Then
change the implementation in
index.tsx to adjust the behavior of the app.
Read the further documentation beginning with the API reference and source code of the official apps to get a more thorough understanding of how apps work.