###前提・実現したいこと
現在、Objective-Cライブラリを利用するための、Xamarin.iOSのバインディングライブラリを作成しています。
引数付きのiOSクラスのイニシャライザを変換しビルドすると、以下のエラーメッセージで移植できないクラスがあります。
対処方法を調べているのですが解決できず、こちらに質問させて頂きました。
###発生している問題・エラーメッセージ
以下の3つのエラーメッセージが出ます
Error CS0132: `NameSpace.NSDateComponents_SomeClass.NSDateComponents_SomeClass(this NSDateComponents, global::System.nint, global::System.nint, global::System.nint, global::System.nint, global::System.nint, global::System.nint)': The static constructor must be parameterless (CS0132) 省略 : static constructor cannot have an access modifier (CS0515) 省略 : static constructor cannot have an explicit `this' or `base' constructor call (CS0514)
###変換元 Objective-C ソースコード
NSDateComponents+SomeClass.h
@interface NSDateComponents (SomeClass) - (instancetype)initWithYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;
###変換後 ソースコード
ApiDefinitions.cs
[Category] [BaseType (typeof(NSDateComponents))] interface NSDateComponents_SomeClass { [Export ("initWithYear:month:day:hour:minute:second:")] IntPtr Constructor (nint year, nint month, nint day, nint hour, nint minute, nint second);
###試したこと
対処方法の調査と、Extra.csで対応を検討しましたが解決していません。
###補足情報(言語/FW/ツール等のバージョンなど)
・Objective Sharpie 3.3.0
・Xamarin Studio 6.1.1
・iOS SDK 9.3
・Binding Native Frameworks
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/25 14:21 編集