Objective-sharpie ApiDefinition 包含重载方法?

Objective-sharpie ApiDefinition contains overloaded methods?

经过一番摸索,我终于让 objective-sharpie 成功绑定了一个 .framework 文件,但是它生成的 ApiDefinition.cs 文件包含一些不规则的地方。

    // @optional -(void)flyerView:(WFKFlyerView * _Nonnull)flyerView gotSingleTap:(id<WFKFlyerViewTapAnnotation> _Nullable)annotation atPoint:(CGPoint)point;
    [Export("flyerView:gotSingleTap:atPoint:")]
    void FlyerView(WFKFlyerView flyerView, [NullAllowed] WFKFlyerViewTapAnnotation annotation, CGPoint point);

    // @optional -(void)flyerView:(WFKFlyerView * _Nonnull)flyerView gotDoubleTap:(id<WFKFlyerViewTapAnnotation> _Nullable)annotation atPoint:(CGPoint)point;
    [Export("flyerView:gotDoubleTap:atPoint:")]
    void FlyerView(WFKFlyerView flyerView, [NullAllowed] WFKFlyerViewTapAnnotation annotation, CGPoint point);

    // @optional -(void)flyerView:(WFKFlyerView * _Nonnull)flyerView gotLongPress:(id<WFKFlyerViewTapAnnotation> _Nullable)annotation atPoint:(CGPoint)point;
    [Export("flyerView:gotLongPress:atPoint:")]
    void FlyerView(WFKFlyerView flyerView, [NullAllowed] WFKFlyerViewTapAnnotation annotation, CGPoint point);

所以这实际上不会编译,因为 Visual Studio 恰当地指出尽管具有不同的 [Export] 属性,但这些方法具有完全相同的定义。我尝试更改它,因此只有一个方法具有多个 [Export] 属性,但这也是不允许的。不知道在这里做什么。

顶部还有一个 using 语句,我认为它试图指向我在 Visual Studio 的 Xamarin 项目中为 [=30] 设置的 Native Reference =] 但它不起作用 (type or namespace could not be found are you missing an assembly reference, etc.)

非常感谢任何帮助!

  1. 通过注释掉生成的代码中的重复实现(即具有相同参数的代码等)修复了警告
  2. 删除了空的生成接口。
  3. 在 ApiDefinition.cs 中注释掉了“使用 xxx(您的 SDK 名称)” — 不能 100% 确定为什么这是必要的!