nsinvalidargumentexception reason unrecognized selector sent to instance - Xamarin iOS

ArunkumaarCNArunkumaarCN INMember ✭✭

Hi All,

I am trying to use third party ios SDKs in xamarin forms ios. I have converted those sdk's into Nativie binding library. I could able to access all the methods in SDK.

My ApiDefinition:

[BaseType(typeof(NSObject))]
public interface SumupSDK
{
    [Export("setupWithAPIKey:")]
    bool SetupWithAPIKey(NSString apiKey);
}

And accessing this method in ios Page renderer as below

        btn = new UIButton(UIButtonType.RoundedRect);

        btn.SetTitle("Hello", UIControlState.Normal);

        btn.Frame = new RectangleF(50, 50, 50, 50);



        btn.TouchUpInside += delegate
        {

                var sumUp = new SumupSDK();

                sumUp.SetupWithAPIKey(new NSString("My-Key"));
        }

But when I am trying run the application I am getting error nsinvalidargumentexception reason unrecognized selector sent to instance.

Can anyone help me to solve this problem?

Thanks
/Chandran S

Answers

Sign In or Register to comment.