User secrets
The app template works with user secrets. This is a recommended method to avoid finding passwords, licenses and API keys directly in the source code. For this purpose, a JSON file is stored on the PC, which contains all the necessary keys. This file is then read into the source code and the keys are loaded.
Format of the secrets.json file
The format must look like this:
{ "AppBasement": { "SyncfusionApiKey": "your_key", "AppCenterKeyiOS": "your_key", "AppCenterKeyAndroid": "your_key", "FirebaseUri": "https://xxx.firebaseio.com", "FirebaseSecret": "", "FirebaseApiKey": "your_key", "FirebaseAuthDomain": "xxxx.firebaseapp.com",, "FirebaseCommonUser": "", "FirebaseCommonUserPassword": "" } }
Beim ersten Start mit Visual Studio 2022 oder neuer, muss diese Datei erstellt werden. Wähle dazu im Projektmappen-Explorer mit der rechten Maustaste “Benutzergeheimisse verwalten” an. Dies öffnet die secrets.json-Datei.
Then copy the template from above into the file and swap the placeholder keys with your own.
Syncfusion
In order to be able to use the full potential of the app template, a separate license from Syncfusion is required. A free community license can be requested for small businesses and individuals.
As soon as you have access, you can create a license key and enter it in the secrets.json.
AppCenter
The app or our EventManager also works with AppCenter and can log events in AppCenter. It is recommended that you also manage your app project in AppCenter and enter your keys there.