Xamarin Binding Objective-C - Unrecognized selector sent
I am having a problem binding this protocol method.
- (void)onInviteTrying:(long)sessionId;
Seems pretty simple, but it looks like my C # method was not found. Here is what I have in the ApiDefinition.cs file
[BaseType (typeof (NSObject))]
[Protocol]
[Model]
interface PortSIPEventDelegate {
[Export ("onInviteTrying:")]
void onInviteTrying (int sessionId);
//
// more stuff here
//
}
interface IPortSIPEventDelegate {}
//
// more stuff here
//
and here is my C # file ...
public class IOSSIPManager : NSObject, IPortSIPEventDelegate, ISIPClient {
//
// more stuff here
//
public void onInviteTrying(int sessionId)
{
// An invite is first trying.
this.OnCallStatusChanged(sessionId, CallStatusUpdate.InviteTrying);
ConnectionStatusManager.Instance.Model.SIPDetailedStatus = "SIP OnInviteTrying";
}
}
I am getting the following error
Objective-C exception. Name: NSInvalidArgumentException Cause: - [StreetSupervisorIOS_IOSSIPManager onInviteTrying:]: unrecognized selector posted to instance 0x17011e50
Any idea what I did wrong? My other methods are working fine. Maybe the problem is with the long ones? I tried with longs and IntPtrs instead of ints, but it didn't work. Thanks in advance.
+3
source to share
No one has answered this question yet
Check out similar questions: