将Obj C绑定到Xamarin项目sharpie问题

时间:2018-02-28 09:38:33

标签: ios objective-c xamarin binding

我试图将原生Objective-C SDK绑定到我的Xamarin项目。我遵循这个tutoriel:Walkthrough: Binding an iOS Objective-C Library

一切正常:使用Objective Sharpie。我生成了ApiDefinition和Strucs文件,但在我的ApiDefinition中,某些类需要协议。

    // @interface BIOEvent : NSObject <BIODiagnosticEvent>
[BaseType(typeof(NSObject))]
interface BIOEvent : IBIODiagnosticEvent
{
    // -(instancetype _Nonnull)initWithType:(BIOEventType)type;
    [Export("initWithType:")]
    IntPtr Constructor(BIOEventType type);
}

例如,此处,文件未找到&#34; IBIODiagnosticEvent&#34;。我的印象是Sharpie没有绑定一些头文件。 @protocol

的文件 你能帮帮我吗? 感谢。

1 个答案:

答案 0 :(得分:1)

好的,对于那些有同样错误的人。 Xamarin添加&#34;我&#34;协议名称之前的约定。只需删除它。