【发布时间】:2018-08-08 03:19:04
【问题描述】:
我正在尝试将本机 Objective-C SDK 绑定到我的 Xamarin 项目。我跟着这个教程: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);
}
例如这里,文件没有找到“IBIODiagnosticEvent”。我的印象是 Sharpie 没有绑定一些头文件。 @protocol 的文件
你能帮帮我吗? 谢谢。
【问题讨论】:
标签: ios objective-c xamarin binding