Forum Xamarin.iOS

Error: The non generic type NSObject cannot be used with type argumenats

Prashant03Prashant03 Member ✭✭
edited September 2020 in Xamarin.iOS

When i try to create binding library through objective sharpie then i am getting error for this code.

NSObject<KSAsyncEventReceiver, KSEcoModulInterface, KSEventSource>

Error: The non generic type NSObject cannot be used with type argumenats.

I already have tried

[BaseType(typeof(NSObject))]
[Model] 

but it is not working.

Any solution?

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    It is well explained in this answer , Objective Sharpie is confusing an Obj-C object that implements those protocols with a C# generic object .

    Could you post the original code (Objective-C) and the generated code (C#) here ? We could try to help you to fix the error .

Sign In or Register to comment.