xamarin-bindings-for-twilio / TwilioVideoXamarinAndroid

MIT License
3 stars 2 forks source link

Dotnet Maui Support #8

Open alberk8 opened 2 years ago

alberk8 commented 2 years ago

Is there going to be support added for Dotnet Maui? Thank you.

4brunu commented 2 years ago

Is there anything special that is needed to be done to support it?

alberk8 commented 2 years ago

I am not sure. Looking at the source (src) I do see managed class library. How does this binding works? Thank you.

jtorvald commented 2 years ago

@alberk8 you could just try it. I haven't had much time to look into Maui and I just checked if I have Maui templates in my preview Visual Studio, but I haven't. When opening the sample project I got the option to install the Maui workload, but of course.... that failed. So I'm not going to the trouble at this moment to see if I can get it to work.

My first guess was 'why shouldn't it work', but after checking the .csproj I noticed it references Mono.Android. And I think Maui does not have Mono.Android. Besides that I don't know how this multiplatform/single project thing works in Maui so, my guess: it probably doesn't work (yet).

Someone needs to dig in to how you make the library available for Maui or even combine android/ios in a single package for ios/android/forms/maui if possible. I don't have time for that this year.

alberk8 commented 2 years ago

I tried to build in Maui and having issues with errors below. There is no error in the VS IDE. When the same nuget is added to Xamarin Project it does compile/build without error.

c:\Test\MauiAppVideo\MauiAppVideo\MainPage.xaml.cs(1,7,1,18): error CS0246: The type or namespace name 'TwilioVideo' could not be found (are you missing a using directive or an assembly reference?)

Severity    Code    Description Project File    Line    Suppression State
Error       com.android.tools.r8.internal.Hc: Attribute InnerClasses requires EnclosingMethod attribute. Check -keepattributes directive.   MauiAppVideo    D:\Staging\Test\MauiAppVideo\MauiAppVideo\R8    1   
jtorvald commented 1 year ago

@alberk8 do you have code-shrinker enabled?

image
ginger-777 commented 1 year ago

Are there any updates regarding support MAUI(NET6)?

jtorvald commented 1 year ago

No but I might need to look into it somewhere in the coming months for another project. Hopefully I can reach out to @4brunu for some support

4brunu commented 1 year ago

I have stoped interacting with Xamarin in my projects, and I'm not sure what is needed for the Dotnet Maui Support.