v-hogood / OpenCvSdk

Android and iOS .NET bindings for OpenCV SDK:
https://github.com/opencv/opencv/tree/4.x/modules/java
5 stars 2 forks source link

iOS bug, maybe update to dotnet 9.0? #7

Open Th3L0x opened 4 days ago

Th3L0x commented 4 days ago

Please could you help I really need this package working

Getting this error on dotnet 9.0 when try to load a model

(in dotnet 8.0 all this worked fine)

Message = "Could not find the type 'ObjCRuntime.Registrar' in the assembly 'OpenCvSdk.iOS'." Source = "Microsoft.iOS" StackTrace = " at ObjCRuntime.RegistrarHelper.GetMapEntry(String assemblyName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/RegistrarHelper.cs:line 105\n at ObjCRuntime.RegistrarHelper.GetMapEntry(Assembly assembly) in /Users/builder/azdo/_work/1/s/xam…" TargetSite = MapInfo GetMapEntry(System.String)

also for tensorflow too

Message = "Could not find the type 'ObjCRuntime.Registrar' in the assembly 'TensorFlowLite'." Source = "Microsoft.iOS" StackTrace = " at ObjCRuntime.RegistrarHelper.GetMapEntry(String assemblyName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/RegistrarHelper.cs:line 105\n at ObjCRuntime.RegistrarHelper.GetMapEntry(Assembly assembly) in /Users/builder/azdo/_work/1/s/xam…"

Th3L0x commented 4 days ago

Do you know what is this ObjCRuntime.Registrar ?

Th3L0x commented 4 days ago

testopencv.zip Here is sample project I just created, could you check it please?

v-hogood commented 1 day ago

I'm not using dotnet 9.0 yet but have you tried opting out of the new default registrar?

https://github.com/xamarin/xamarin-macios/wiki/.NET-9-release-notes#type-registrar-managed-static-as-the-new-default

v-hogood commented 1 day ago

That's referenced from https://github.com/TobiasBuchholz/Plugin.Firebase/issues/372