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

.NET MAUI iOS - System.DllNotFoundException: NcnnDotNetNative #19

Open
ITBrainSol opened this issue Dec 31, 2024 · 1 comment
Open

.NET MAUI iOS - System.DllNotFoundException: NcnnDotNetNative #19

ITBrainSol opened this issue Dec 31, 2024 · 1 comment

Comments

@ITBrainSol
Copy link

I've developed a .NET MAUI App and used "UltraFaceDotNet" for face detection.

It works fine in Android but when I try to execute the same code for iOS it return with following exception

{System.DllNotFoundException: NcnnDotNetNative
   at NcnnDotNet.Net..ctor()
   at UltraFaceDotNet.UltraFace..ctor(UltraFaceParameter parameter)
   at UltraFaceDotNet.UltraFace.Create(UltraFaceParameter parameter)
   at CamView.Services.DetectService..ctor() in {MY-PROJECT-PATH}\DetectService.cs:line 76}

Line # 76 is where it's trying to Create UltraFace object from provided parameters as following

var param = new UltraFaceParameter
       {
           BinFilePath = binPath,
           ParamFilePath = paramPath,
           InputWidth = 320,
           InputLength = 240,
           NumThread = 1,
           ScoreThreshold = 0.7f
       };

       this._UltraFace = UltraFace.Create(param);

Following are the libraries and files I've used

image

It also created link to following Libs

image

Can you please help to find out the issue?

Many Thanks

@andersonvieiragomeslopes

Hi @ITBrainSol

I tried it on my iOS and it didn't work, but it also doesn't generate errors. Did you try adding this?

<MtouchExtraArgs>-gcc_flags "-lc++ -framework Metal"</MtouchExtraArgs>

I'll try adding it here and see if it works. It works fine on my Android, but not on iOS.

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

No branches or pull requests

2 participants