Windows UWP

Last modified by Julien Wadel on 2022/11/17 10:37


Windows UWP with linphone-sdk

There are 3 kinds of binary :

  • Win32 : this is a standard version for Windows with all features.
  • WindowsStore : this version is a build of Win32 but with compilation options to allow a Win32 application to be publishable in Windows Store.
  • UWP : This version is to be used on UWP application. It is not all featured (for example: before 5.2, OpenH264 wasn't available )

All of these kinds of binary can be build at least on x86 and x64.

Installing the Nuget package

A NuGet package (.nupkg) embedding and wrapping the Linphone SDK for UWP development on Windows is provided for your convenience.

It supports 3 frameworks:

  • - netcore (WindowsStore-32bits)
  • - netcore45 (Win32-32bits)
  • - uap10.0 (UWP-64bits)

Some other frameworks are provided for convenience but aren't fully tested:

  • - net5.0 : .NET 5
  • - netstandard2.1:.NET Standard
  • - netcoreapp3.1 : .NET Core
  • - net48 : .NET Framework

If you would like to use another framework, you can build a nuget package from source. In the project, you have to add a target framework in 'cmake/NuGet/windows/' by adding your item in 'dependencies' section:
<group targetFramework="<your target framework>" />

From our Package Registry (>= v5.2.0)

Since version 5.2.0, the nupkg is availble for download from our self-hosted NuGet package registry.

  1. Add the Linphone package source to your development environment (You only need to do that once)
    nuget source Add -Name "Linphone" -Source ""
    Or in Visual Studio, go to Tools->Nuget Package Manager->Package Manager Settings, go to Package sources, add a new package source with the URL above. (See below for screenshots of a similar process)
  2. Install the LinphoneSDK.Windows package from that new source
    nuget install LinphoneSDK.Windows -Source "Linphone"

You will then be able to update the package as you do other NuGet packages.

From a local package source (< v5.2.0)

For versions below 5.2.0, you will have to manually download or build the nupkg and setup a local source from which to install it.

For versions 5.0.x or 5.1.x, you can get pre-built Nuget packages from :

For anything older, you will have to build it from source:

Download the nuget package and place it in the folder of your choice

In Visual Studio with your project, go to Tools->Nuget Package Manager->Package Manager Settings, go to Package sources, add a new package source to the folder.


After this go to Tools->Nuget Package Manager->Manage Nuget Packages for solution. Select the local source.


Select the project which the sdk will be install.


On updating, be careful to the version : If the version is the same as an old version (for example, it can happen when building your own package), you have to manually delete the folder in .nuget:
Visual Studio try to use the cache before using the version inside the custom folder where you put your package.

Get Liblinphone Log in Visual Studio Output

To set the log in Liblinphone your need to call this:

Linphone.LoggingService.Instance.LogLevel = Linphone.LogLevel.Debug;

After this, go to the properties of your UWP project:


Select the "Mixed (Managed and Native)" option for the Debugger type.


Application capabilities

Don't forget to set permission for your applications.

Open Package.appxmanifest:


Set the capabilities needed for your application:


More Help

Demo application :

Documentation :

Tutorials :

Windows UWP with Old Win32 linphone-sdk

This is working only with linphone SDK >= 4.0 and without the current nuget version (5.0)

The ability to create a Windows app package for your desktop application (otherwise known as the Desktop Bridge) was introduced in Windows 10, version 1607, and it can only be used in projects that target Windows 10 Anniversary Update (10.0; Build 14393) or a later release in Visual Studio.

Create the desktop project for UWP

Just follow steps here:

Resources to be embedded in application

liblinphone does requires 2 resources files from the nuget paquet to be embedded in the application.

<Content Include="Assets\belr\grammars\cpim_grammar">
<Content Include="Assets\belr\grammars\vcard_grammar">

Display video

You need to clone the repository "mswinrtvid" add to your project visual studio the project ./mswinrtvid/MSWinRTVideo.vcxproj
Reference MSWinRTVideo in your project. This project will add a new UI form "SwapChainPanel"
Add in your "Package.appxmanifest":

<Extension Category="windows.activatableClass.inProcessServer">
<ActivatableClass ActivatableClassId="MSWinRTVideo.SchemeHandler" ThreadingModel="both" ></ActivatableClass>


<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="3"></SwapChainPanel>
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="2" RenderTransformOrigin="0.5,0.5">
<CompositeTransform x:Name="PreviewRender" ScaleX="-1"></CompositeTransform>


 private void StartVideoStream() {
           try {
               _videoSource = new MSWinRTVideo.SwapChainPanelSource();
               _previewSource = new MSWinRTVideo.SwapChainPanelSource();

               LinphoneManager.Instance.Core.NativeVideoWindowIdString = VideoSwapChainPanel.Name;
               LinphoneManager.Instance.Core.NativePreviewWindowIdString = PreviewSwapChainPanel.Name;
            } catch (Exception e) {
               Debug.WriteLine(String.Format("StartVideoStream: Exception {0}", e.Message));

       private void StopVideoStream() {
           try {
               if (_videoSource != null) {
                   _videoSource = null;
               if (_previewSource != null) {
                   _previewSource = null;
            } catch (Exception e) {
               Debug.WriteLine(String.Format("StopVideoStream: Exception {0}", e.Message));