Skip to content

Installation

Setup Overview

You will need the following development software to get the demo app running from source. Any actions documented regarding macOS can be taken on a remote Mac as well.

It is strongly recommended to install all software in the given order so Visual Studio Code can find the required Frameworks and SDKs right away.

You might be successful with other IDEs like Rider, but Microsoft recommends Visual Studio Code for .NET MAUI development so this documentation will not consider any other IDEs.

See also: What happened to Visual Studio for Mac?

Don't forget to add your Apple Developer Account to XCode and to set up your Certificate and Profile (more detail below).

Visual Studio Code Setup

  1. Install the above mentioned extensions for Visual Studio Code
  2. Clone the emrtd-connector-sdk-maui
  3. Open the cloned folder in Visual Studio Code
  4. Ignore the NuGet error popping up for now, the NuGet will be built later on
  5. Confirm installation of the .NET MAUI SDK if asked
  6. Install missing components and SDKs (if there are any left at this point):
    sh
    cd kinegram-emrtd-connector-maui
    dotnet workload restore
  7. Again, in your terminal, trigger a build on the missing NuGet:
    sh
    cd kinegram-emrtd-connector-maui-android
    dotnet build kinegram-emrtd-connector-maui-android.csproj

This will create the kinegram-emrtd-connector-maui-android.x.x.x.nupkg which is the Android eMRTD Connector SDK wrapped in a NuGet for use in .NET MAUI. You can find further information regarding the SDKs and the steps required to apply changes made by yourself in Customizing the Native SDKs.

Starting the Android app

  1. Open a code file in the editor, for example Pages/MainPage.xaml.cs
  2. Click the curly brackets in the Status Bar (bottom right), click Debug Target and pick your device from the list presented – if your device does not show up in the list start ADB in your terminal: adb start-server
  3. If Visual Studio Code asks for an Android SDK location, pick the one suggested, this usually is /Users/<username>/Library/Android/sdk on macOS and /Users/<username>/AppData/Local/Android/sdk on Windows
  4. Run the app
    • Click the Run and Debug icon on the left and then the Run and Debug button
    • Or click the Run project associated with this file (play icon) on the top right

Starting the iOS app

  1. Open kinegram-emrtd-connector-maui.csproj and adjust the values in CodesignKey and CodesignProvision for Debug and/or Release to your own certificate and profile names
  2. Open Platforms/Info.plist and adjust CFBundleIdentifier to the bundle identifier you set in your Apple Developer Account for this app
  3. Open a code file in the editor, for example Pages/MainPage.xaml.cs
  4. Run the app
    • Click the Run and Debug icon on the left and then the Run and Debug button
    • Or click the Run project associated with this file (play icon) on the top right