{"id":58098,"date":"2023-04-22T12:07:12","date_gmt":"2023-04-22T10:07:12","guid":{"rendered":"https:\/\/ar3dp.de\/docs\/programmieren\/net-maui-basis-applikation-app-template\/erste-schritte\/"},"modified":"2023-04-22T12:07:12","modified_gmt":"2023-04-22T10:07:12","slug":"erste-schritte","status":"publish","type":"docs","link":"https:\/\/ar3dp.de\/en\/docs\/programmieren\/net-maui-basis-applikation-app-template\/erste-schritte\/","title":{"rendered":"Getting started"},"content":{"rendered":"<h3 class=\"wp-block-heading\">User secrets<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Format of the secrets.json file<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The format must look like this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;application\/json&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;JSON&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;json&quot;}\">{\n  &quot;AppBasement&quot;: {\n    &quot;SyncfusionApiKey&quot;: &quot;your_key&quot;,\n    &quot;AppCenterKeyiOS&quot;: &quot;your_key&quot;,\n    &quot;AppCenterKeyAndroid&quot;: &quot;your_key&quot;,\n    &quot;FirebaseUri&quot;: &quot;https:\/\/xxx.firebaseio.com&quot;,\n    &quot;FirebaseSecret&quot;: &quot;&quot;,\n    &quot;FirebaseApiKey&quot;: &quot;your_key&quot;,\n    &quot;FirebaseAuthDomain&quot;: &quot;xxxx.firebaseapp.com&quot;,\n    &quot;LicenseManagerProductCode&quot;: &quot;xxxx&quot;\n  }\n}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Beim ersten Start mit Visual Studio 2022 oder neuer, muss diese Datei erstellt werden. W\u00e4hle dazu im Projektmappen-Explorer mit der rechten Maustaste &#8220;Benutzergeheimisse verwalten&#8221; an. Dies \u00f6ffnet die secrets.json-Datei.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"443\" height=\"550\" src=\"https:\/\/ar3dp.de\/wp-content\/uploads\/2023\/04\/maui_app_template_user_secrets_1.png\" alt=\"Manage user secrets in Visual Studio\" class=\"wp-image-58104\" srcset=\"https:\/\/ar3dp.de\/wp-content\/uploads\/2023\/04\/maui_app_template_user_secrets_1.png 443w, https:\/\/ar3dp.de\/wp-content\/uploads\/2023\/04\/maui_app_template_user_secrets_1-10x12.png 10w, https:\/\/ar3dp.de\/wp-content\/uploads\/2023\/04\/maui_app_template_user_secrets_1-380x472.png 380w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then copy the template from above into the file and swap the placeholder keys with your own.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Syncfusion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<div class=\"wp-block-fgb-button aligncenter fgb-button-wrapper\"><a href=\"https:\/\/www.syncfusion.com\/products\/communitylicense\" class=\"fgb-button btn fgb-button--align-center btn-soft-primary transition-3d-hover\" rel=\"nofollow noopener\" target=\"_blank\"><div class=\"fgb-button--inner\">Apply for a community license<\/div><\/a><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As soon as you have access, you can create a license key and enter it in the secrets.json.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">AppCenter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<div class=\"wp-block-fgb-button aligncenter fgb-button-wrapper\"><a href=\"https:\/\/appcenter.ms\/\" class=\"fgb-button btn fgb-button--align-center btn-soft-primary transition-3d-hover\" rel=\"nofollow noopener\" target=\"_blank\"><div class=\"fgb-button--inner\">App Center<\/div><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Funktionen aktivieren bzw. deaktivieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Das App-Template bietet einige Funktionen, welche nicht in jeder App ben\u00f6tigt werden. Diese sind standardm\u00e4\u00dfig deaktiviert und k\u00f6nnen in der Projektdatei aktiviert werden.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">\t\t&lt;!-- Enables optional parts of the app template--&gt;\n\t\t&lt;DefineConstants&gt;$(DefineConstants);Firebase;FirebaseAuth&lt;\/DefineConstants&gt;\n\t\t&lt;DefineConstants&gt;$(DefineConstants);License&lt;\/DefineConstants&gt;\n\t\t&lt;DefineConstants&gt;$(DefineConstants);AppCenter&lt;\/DefineConstants&gt;<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Dazu m\u00fcssen die jeweiligen Konstanten einfach aus dem Kommentartag <code>&lt;!-- --&gt;<\/code> herausgenommen werden. Gewissen Funktionen ben\u00f6tigen zus\u00e4tzliche Nugets bzw. weitere Anpassungen. Mehr dazu findest du unter den jeweiligen Funktionspunkten, welche folgen.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">AppCenter<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr die AppCenter-Integration nutzen wir folgende Nugets, welche hinzugef\u00fcgt werden m\u00fcssen, sobald du die AppCenter-Funktionen nutzen m\u00f6chtest.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">\t  &lt;!-- Needed for AppCenter --&gt;\n\t  &lt;PackageReference Include=&quot;Microsoft.AppCenter&quot; Version=&quot;5.0.3&quot; \/&gt;\n\t  &lt;PackageReference Include=&quot;Microsoft.AppCenter.Analytics&quot; Version=&quot;5.0.3&quot; \/&gt;\n\t  &lt;PackageReference Include=&quot;Microsoft.AppCenter.Crashes&quot; Version=&quot;5.0.3&quot; \/&gt;<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Des Weiteren, vergewissere dich, dass du die n\u00f6tigen Schl\u00fcssel in der <code>secrets.json<\/code>-Datei setzt!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Firebase<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr die Firebase-Integration nutzen wir folgende Nugets, welche hinzugef\u00fcgt werden m\u00fcssen, sobald du die Firebase-Funktionen nutzen m\u00f6chtest.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">\t  &lt;!-- Needed for Firebase --&gt;\n\t  &lt;PackageReference Include=&quot;FirebaseAuthentication.net&quot; Version=&quot;4.1.0&quot; \/&gt;\n\t  &lt;PackageReference Include=&quot;FirebaseDatabase.net&quot; Version=&quot;4.2.0&quot; \/&gt;<\/pre><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">AppShell<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Entferne den <code>Firebase<\/code> Kommentar in der <code>AppShell<\/code> um den Men\u00fcpunkt zu aktivieren, welcher den Account verwaltet.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">&lt;!-- Firebase --&gt;\n&lt;MenuItem \n    Text=&quot;{x:Static localization:Strings.Account}&quot; \n    Command=&quot;{Binding ShowFirebaseAccountCommand}&quot;\n    &gt;\n    &lt;MenuItem.IconImageSource&gt;\n        &lt;FontImageSource\n            FontFamily=&quot;{StaticResource FontIcons}&quot;\n            Glyph=&quot;{x:Static iconsSyncfusion:SyncfusionIcons.Account}&quot;\n            Color=&quot;{DynamicResource PrimaryColor}&quot;\n            Size=&quot;Large&quot;\n            &gt;\n        &lt;\/FontImageSource&gt;\n    &lt;\/MenuItem.IconImageSource&gt;\n&lt;\/MenuItem&gt;\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Des Weiteren, vergewissere dich, dass du die n\u00f6tigen Schl\u00fcssel in der <code>secrets.json<\/code>-Datei setzt!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">License<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr die Lizenz-Integration nutzen wir folgendes Nuget, welche hinzugef\u00fcgt werden muss, sobald du die Lizenz-Funktionen nutzen m\u00f6chtest.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">\t  &lt;!-- Needed for licensing --&gt;\n\t  &lt;PackageReference Include=&quot;SharedMauiCoreLibrary.Licensing&quot; Version=&quot;1.1.1&quot; \/&gt;<\/pre><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">AppShell<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Entferne den <code>License<\/code> Kommentar in der <code>AppShell<\/code> um den Men\u00fcpunkt zu aktivieren, welcher die Lizenz verwaltet.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;xml&quot;,&quot;mime&quot;:&quot;application\/xml&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;XML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;xml&quot;}\">    &lt;!-- License --&gt;\n    &lt;MenuItem \n        Text=&quot;{x:Static localization:Strings.License}&quot; \n        Command=&quot;{Binding ShowLicenseDetailsPageCommand}&quot;\n        &gt;\n        &lt;MenuItem.IconImageSource&gt;\n            &lt;FontImageSource\n                FontFamily=&quot;{StaticResource MaterialDesignIcons}&quot;\n                Glyph=&quot;{x:Static icons:MaterialIcons.AccountKeyOutline}&quot;\n                Color=&quot;{DynamicResource PrimaryColor}&quot;\n                Size=&quot;Large&quot;\n                &gt;\n            &lt;\/FontImageSource&gt;\n        &lt;\/MenuItem.IconImageSource&gt;\n    &lt;\/MenuItem&gt;\n   <\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Des Weiteren, vergewissere dich, dass du die n\u00f6tigen Schl\u00fcssel in der <code>secrets.json<\/code>-Datei setzt!<\/p>","protected":false},"excerpt":{"rendered":"<p>Benutzergeheimnisse Das App-Template arbeitet mit Benutzergeheimissen (User Secrets). Dies ist eine empfohlene Methode um zu vermeiden, dass Passw\u00f6rter, Lizenzen und API-Schl\u00fcssel direkt im Quell-Code auffindbar sind. Dazu wird eine JSON-Datei auf dem PC abgelegt, welche alle n\u00f6tigen Schl\u00fcssel enth\u00e4lt. Im Quellcode wird dann diese Datei eingelesen und die Schl\u00fcssel geladen. Format der secrets.json-Datei Das Format&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"parent":57992,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"_featured":false,"_is_vendor_doc":"0","footnotes":""},"doc_tag":[],"class_list":["post-58098","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/58098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/comments?post=58098"}],"version-history":[{"count":3,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/58098\/revisions"}],"predecessor-version":[{"id":58742,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/58098\/revisions\/58742"}],"up":[{"embeddable":true,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/57992"}],"next":[{"title":"Hosting & AppBuilder","link":"https:\/\/ar3dp.de\/en\/docs\/programmieren\/net-maui-basis-applikation-app-template\/hosting-appbuilder\/","href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/58146"}],"prev":[{"title":"Introducing .NET MAUI AppTemplate","link":"https:\/\/ar3dp.de\/en\/docs\/programmieren\/net-maui-basis-applikation-app-template\/vorstellung-net-maui-apptemplate\/","href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/docs\/57993"}],"wp:attachment":[{"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/media?parent=58098"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/ar3dp.de\/en\/wp-json\/wp\/v2\/doc_tag?post=58098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}