Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MAUI example app to csharp samples #4078

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

weslleymurdock
Copy link

This covers #4077
I've created the sample application for both iOS & Android platforms, and some modifications on makefile to generate c# PINVOKE classes to the right project as well

@CLAassistant
Copy link

CLAassistant commented Sep 15, 2024

CLA assistant check
All committers have signed the CLA.

@trengginas
Copy link
Member

I am stuck with these error when trying to build the app:

/usr/local/share/dotnet/sdk/8.0.403/Microsoft.Common.CurrentVersion.targets(2303,5): error MSB4803: The task "ResolveNativeReference" is not supported on the .NET Core version of MSBuild. Please use the .NET Framework version of MSBuild. See https://aka.ms/msbuild/MSB4803 for further details. [/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/pjsua2maui.csproj::TargetFramework=net8.0-android]
/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/Platforms/iOS/CallPageHandler.cs(4,40): error CS0234: The type or namespace name 'Compatibility' does not exist in the namespace 'Microsoft.Maui.Controls.Handlers' (are you missing an assembly reference?) [/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/pjsua2maui.csproj::TargetFramework=net8.0-ios]
/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/Platforms/iOS/AppDelegate.cs(6,28): error CS0246: The type or namespace name 'MauiUIApplicationDelegate' could not be found (are you missing a using directive or an assembly reference?) [/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/pjsua2maui.csproj::TargetFramework=net8.0-ios]
/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/Platforms/iOS/CallPageHandler.cs(16,33): error CS0246: The type or namespace name 'VisualElementRenderer<>' could not be found (are you missing a using directive or an assembly reference?) [/pjsip/test/pjsip-apps/src/swig/csharp/pjsua2maui/pjsua2maui/pjsua2maui.csproj::TargetFramework=net8.0-ios]

@weslleymurdock
Copy link
Author

Hello
Which version of dotnet you`re using
Please post the dotnet setup details

@weslleymurdock
Copy link
Author

Hi again
I'll try to create a global.json to configure the .ned sdk version as the same i've used

@weslleymurdock
Copy link
Author

Hello @trengginas I've reproduced this when i'm used the global on a mac. And i've done the android sample on windows, which uses the ResolveNativeReference MSBuild Task for resolve the android libs. Try use windows while i'm working on a new android sample

@trengginas
Copy link
Member

I'm using a Mac since it's not possible to build the iOS sample app on Windows.

@weslleymurdock
Copy link
Author

To "build on windows" you can use the ssh connection of visual studio to debug and run the iOS app on emulator inside Windows Environment.
But if is not possible use a windows pc, try to build one target only (e.g Android only or iOS only).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants