# Installation

Methods for Installing a Library in MAUI

* Step 1 -> Create or edit the `nuget.config` file in your solution directory:

There are 2 methods to configure NuGet packages

**Method 1 - Using CLI Command**: Navigate to your project directory in the terminal and run the command `dotnet add package [LibraryName]` to add the desired library.

```bash
dotnet nuget add source https://nuget.pkg.github.com/Truvideo/index.json -n truvideo
```

**Method 2 - Using NuGet Package Manager**:&#x20;

Add following lines to the file&#x20;

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="truvideo" value="https://nuget.pkg.github.com/Truvideo/index.json" />
  </packageSources>
</configuration>
```

<figure><img src="https://2795485726-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSx1WmCO08xjkh66Ir7kJ%2Fuploads%2FSEC2CYDsn3e3uEo67e6C%2FScreenshot%202025-06-23%20at%204.07.58PM.png?alt=media&#x26;token=57e70780-5394-4fa4-b4db-3948a060c392" alt="" width="563"><figcaption></figcaption></figure>

* Step 2 -> Configure GitHub Authentication

  &#x20;You need to configure your GitHub credentials to access the package feed. Add the following to your \`nuget.config\` file:

```xml
<packageSourceCredentials>
    <truvideo>
        <add key="Username" value="YOUR_GITHUB_USERNAME" />
        <add key="ClearTextPassword" value="YOUR_GITHUB_PAT" />
    </truvideo>
</packageSourceCredentials>
```

* Step 3 ->&#x20;

Replace:\
\- \`YOUR\_GITHUB\_USERNAME\` with your GitHub username\
\- \`YOUR\_GITHUB\_PAT\` with a GitHub Personal Access Token that has \`read:packages\` scope&#x20;

> **Important**: You must create a GitHub Personal Access Token with both \`repo\` and \`packages\` permissions. Without these specific permissions, package installation will fail. To create a token:
>
> 1. Go to GitHub Settings > Developer Settings > Personal Access Tokens
> 2. Generate a new token with at least \`repo\` and \`packages\` scopes
> 3. Copy the token immediately as it won't be shown again

{% hint style="info" %}
**Note**: Never commit your GitHub credentials to source control. Consider using environment variables or user-specific configuration files.
{% endhint %}

* Step 4 -> Install Required Packages

If you configured the package source manually, you need to install the required packages using the following commands:

Check latest version -

**Core -** [**Android** ](https://github.com/Truvideo/truvideo-sdk-core-android-net/pkgs/nuget/TruVideoCoreAndroidBinding)**,** [**iOS**](https://github.com/Truvideo/truvideo-sdk-core-net/pkgs/nuget/TruVideoCoreiOSBinding)&#x20;

**Camera -** [**Android** ](https://github.com/Truvideo/truvideo-sdk-camera-android-net/pkgs/nuget/TruVideoCameraAndroidBinding)**,** [**iOS**](https://github.com/Truvideo/truvideo-sdk-camera-net/pkgs/nuget/TruVideoCameraiOSBinding)

**Media -** [**Android** ](https://github.com/Truvideo/truvideo-sdk-media-android-net/pkgs/nuget/TruVideoMediaAndroidBinding)**,** [**iOS**](https://github.com/Truvideo/truvideo-sdk-media-net/pkgs/nuget/TruVideoMediaiOSBinding)

**Video -** [**Android** ](https://github.com/Truvideo/truvideo-sdk-video-android-net/pkgs/nuget/TruVideoVideoAndroidBinding)**,** [**iOS**](https://github.com/Truvideo/truvideo-sdk-video-net/pkgs/nuget/TruVideoVideoiOSBinding)

**Image -** [**Android** ](https://github.com/Truvideo/truvideo-sdk-image-android-net/pkgs/nuget/TruVideoImageAndroidBinding)**,** [**iOS**](https://github.com/Truvideo/truvideo-sdk-image-net/pkgs/nuget/TruVideoImageiOSBinding)

<figure><img src="https://2795485726-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSx1WmCO08xjkh66Ir7kJ%2Fuploads%2FzMkpSuhwezxP9P7xYtNT%2FScreenshot%202025-06-23%20at%204.11.38PM.png?alt=media&#x26;token=76dc5ea3-0ab9-4396-a201-6363dfeaa73b" alt="" width="563"><figcaption></figcaption></figure>

```bash
#for iOS 
dotnet add package TruVideoCoreiOSBinding --version {version}
dotnet add package TruVideoCameraiOSBinding --version {version}
dotnet add package TruVideoMediaiOSBinding --version {version}
dotnet add package TruVideoVideoiOSBinding --version {version}
dotnet add package TruVideoImageiOSBinding --version {version}

#for Android 
dotnet add package TruVideoCoreAndroidBinding --version {version}
dotnet add package TruVideoCameraAndroidBinding --version {version}
dotnet add package TruVideoMediaAndroidBinding --version {version}
dotnet add package TruVideoVideoAndroidBinding --version {version}
dotnet add package TruVideoImageAndroidBinding --version {version}
```

* Step 5 -> **Important Project Configuration**

When implementing the SDK in your own application, make sure to add the following configuration to your `.csproj` file:

<figure><img src="https://2795485726-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSx1WmCO08xjkh66Ir7kJ%2Fuploads%2Fy3NJNphJfgJmbE6XJBiX%2FScreenshot%202025-06-23%20at%204.10.50PM.png?alt=media&#x26;token=7294fe12-f9ba-4fe1-9fb3-20c1db31ec0f" alt="" width="563"><figcaption></figcaption></figure>

```xml
<PropertyGroup>
    <MtouchExtraArgs>--require-pinvoke-wrappers=true</MtouchExtraArgs>
    <Registrar>static</Registrar>
</PropertyGroup>
```

You are now ready to proceed with development
