Skip to content

Demo project to try WebRTC native bindings in .net MAUI

Notifications You must be signed in to change notification settings

Bohdandn/MAUI.WebRTC.Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

MAUI.WebRTC.Demo

Demo project to try WebRTC native bindings in .net MAUI. There are two projects with Xamarin bindings

Binding libraries are based on https://github.com/dmariogatto/xamarin-webrtc

How to build via CLI from windows:

  • dotnet workload install maui-android maui-ios
  • On remote mac: dotnet workload install maui-ios
  • Check that versions of workloads are similar othewise reinstall with updated workload manifest
  • cd \src\MauiSampleApp
  • dotnet build -f:net6.0-android
  • dotnet build -f:net6.0-ios /p:ServerAddress={remote mac ip} /p:ServerUser={mac user name} /p:ServerPassword={mac user pw} /p:TcpPort=58181

Status

Android

Android working perfectly without any modifications from CLI and VS.

iOS

iOS ApiDefinitions.cs was modified in order to complie:

  • AutoGeneratedName = true - removed
  • [iOS(10, 0)] - commented
  • new RTCVideoCodecInfo[] SupportedCodecs { get; } - new added

Building from CLI

iOS working perfectly if compiled on mac os. On windows it is failing with hundreds of similar errors for all Microsoft.iOS classes used in api definitions file:

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.523\tools\msbuild\iOS\Xamarin.Shared.targets(1640,3): error CS0433: The type 'ExportAttribute' exists in both 'Microsoft.iOS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Microsoft.iOS, Version=15.4.300.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\XXX\src\WebRtc.iOS\WebRtc.iOS.csproj]

As I understand msbuild copies all referenced libraries including Microsoft.iOS.dll to remote mac. Looks like build conflicts between original sdk libraries and copied sdk libraries.

Building from VS

Fails with issue discribed in xamarin/xamarin-macios#16001.

Feel free to suggest any solutions or create PR's from forks. I will get back here time to time and try to fix iOS bindings or check if it was fixed by .net team.

About

Demo project to try WebRTC native bindings in .net MAUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published