dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.03k stars 1.73k forks source link

IOS Binding Library - the native class hasn't been loaded. #24881

Closed adarshchiniwar-smartq closed 3 days ago

adarshchiniwar-smartq commented 5 days ago

Hi, We are trying to integratre Epson Ios SDK into our .NET MAUI App, I have sucessfully created IOS binding library and using it in .NET maui project, While creating the instance of a class i am getting below error {System.Exception: Could not create an native instance of the type 'EpsonIosFramework.Epos2Printer': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false. at Foundation.NSObject.InitializeObject(Boolean alloced) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:line 382 at Foundation.NSObject..ctor(NSObjectFlag x) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:line 221 at EpsonIosFramework.Epos2CommonPrinter..ctor(NSObjectFlag t) at EpsonIosFramework.Epos2Printer..ctor(Int32 printerSeries, Int32 lang) at EpsonMaui.MainPage.ConnectToPrinter() in C:\Users\Adarsh.Chiniwar\source\repos\EpsonMaui\EpsonMaui\MainPage.xaml.cs:line 40} Please help me resolve this issue.

Github repos Maui Project - https://github.com/adarshchiniwar-smartq/EpsonMaui IOS Binding Library - https://github.com/adarshchiniwar-smartq/EpsonIosFramework

Please help us resolve this issue

Thanks, Adarsh

github-actions[bot] commented 5 days ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

drasticactions commented 4 days ago

Binding questions and issues should go to xamarin-macios, which maintains this tooling.

@rolfbjarne Would you have any advice for this user?

rolfbjarne commented 3 days ago

@adarshchiniwar-smartq please get an MSBuild binlog that shows the error.

rolfbjarne commented 3 days ago

This issue was moved to xamarin/xamarin-macios#21302