C# 注册器无法仅在设备上为骨架接口数组(MTOUCHTASK错误MT4111)生成签名
这就是我的问题:C# 注册器无法仅在设备上为骨架接口数组(MTOUCHTASK错误MT4111)生成签名,c#,ios,xamarin,xamarin.ios,C#,Ios,Xamarin,Xamarin.ios,这就是我的问题: 我在objc静态库中定义了一些协议,如下所示: @protocol IBar; @protocol IFoo <NSObject> @property(nonatomic, strong) NSArray *bars; @property(nonatomic, strong) id <IBar> currentBar; @end 一切编译都很好,在模拟器上工作没有任何问题,但当我尝试在设备上部署它时,我得到: MTOUCHTASK:错误MT
- 我在objc静态库中定义了一些协议,如下所示:
@protocol IBar; @protocol IFoo <NSObject> @property(nonatomic, strong) NSArray *bars; @property(nonatomic, strong) id <IBar> currentBar; @end
Binding.IIBar[]生成签名。
任务“MTouchTask”执行--失败
感谢您的回复这看起来像是Xamarin.iOS中的一个问题,协议阵列无法正常工作
一种解决方法是绑定为NSObject[]
或NSArray
我建议对它提出一个bug,这样它就可以得到修复()
// @protocol IBar <NSObject>
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface IBar
{
// @required @property (nonatomic, strong) NSString * name;
[Export ("name", ArgumentSemantic.Strong)]
string Name { get; set; }
}
interface IIBar {}
// @protocol IFoo <NSObject>
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface IFoo
{
// @required @property (nonatomic, strong) NSArray * bars;
[Export ("bars", ArgumentSemantic.Strong)]
IIBar[] Bars { get; set; }
// @required @property (nonatomic, strong) id<IBar> currentBar;
[Export ("currentBar", ArgumentSemantic.Strong)]
IIBar CurrentBar { get; set; }
}
public class Foo : NSObject, IIFoo
{
//...
}
public class Bar : NSObject, IIBar
{
//...
}