1
votes

I am binding Account Kit iOS framework in Xamarin iOS. I successfully generated ApiDefinition.cs and Structs.cs file using Objective Sharpie and have linked the native Account Kit library in Native References.

When I build the project in Xamarin Studio, I get this error.

"/Projects/AccountKit/AccountKit/obj/Release/ios/AccountKit/AKFAccountKit.g.cs: Error CS0246: The type or namespace name `AKFViewController' could not be found. Are you missing an assembly reference? (CS0246) (AccountKit)".

I think it is asking for "View Controllers" that will use in Account Kit framework. How do I solve this?

This is my "ApiDefinition.cs" code that Objective Sharpie generated:

using System;
using Foundation;
using ObjCRuntime;
using UIKit;

namespace AccountKit
{
    // @protocol AKFAccessToken <NSObject, NSCopying, NSSecureCoding>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAccessToken : INSCopying, INSSecureCoding
    {
        // @required @property (readonly, copy, nonatomic) NSString * _Nonnull accountID;
        [Abstract]
        [Export("accountID")]
        string AccountID { get; }

        // @required @property (readonly, copy, nonatomic) NSString * _Nonnull applicationID;
        [Abstract]
        [Export("applicationID")]
        string ApplicationID { get; }

        // @required @property (readonly, copy, nonatomic) NSDate * _Nonnull lastRefresh;
        [Abstract]
        [Export("lastRefresh", ArgumentSemantic.Copy)]
        NSDate LastRefresh { get; }

        // @required @property (readonly, assign, nonatomic) NSTimeInterval tokenRefreshInterval;
        [Abstract]
        [Export("tokenRefreshInterval")]
        double TokenRefreshInterval { get; }

        // @required @property (readonly, copy, nonatomic) NSString * _Nonnull tokenString;
        [Abstract]
        [Export("tokenString")]
        string TokenString { get; }
    }

    // @protocol AKFAccount <NSObject, NSCopying, NSSecureCoding>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAccount : INSCopying, INSSecureCoding
    {
        // @required @property (readonly, copy, nonatomic) NSString * _Nonnull accountID;
        [Abstract]
        [Export("accountID")]
        string AccountID { get; }

        // @required @property (readonly, copy, nonatomic) NSString * _Nullable emailAddress;
        [Abstract]
        [NullAllowed, Export("emailAddress")]
        string EmailAddress { get; }

        // @required @property (readonly, copy, nonatomic) AKFPhoneNumber * _Nullable phoneNumber;
        [Abstract]
        [NullAllowed, Export("phoneNumber", ArgumentSemantic.Copy)]
        AKFPhoneNumber PhoneNumber { get; }
    }

    // @interface AKFAccountPreferences : NSObject
    [BaseType(typeof(NSObject))]
    [DisableDefaultCtor]
    interface AKFAccountPreferences
    {
        [Wrap("WeakDelegate")]
        [NullAllowed]
        AKFAccountPreferencesDelegate Delegate { get; set; }

        // @property (nonatomic, weak) id<AKFAccountPreferencesDelegate> _Nullable delegate;
        [NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
        NSObject WeakDelegate { get; set; }

        // -(void)deletePreferenceForKey:(NSString * _Nonnull)key;
    [Export("deletePreferenceForKey:")]
        void DeletePreferenceForKey(string key);

        // -(void)loadPreferenceForKey:(NSString * _Nonnull)key;
        [Export("loadPreferenceForKey:")]
        void LoadPreferenceForKey(string key);

        // -(void)loadPreferences;
        [Export("loadPreferences")]
         void LoadPreferences();

        // -(void)setPreferenceForKey:(NSString * _Nonnull)key value:(NSString * _Nullable)value;
        [Export("setPreferenceForKey:value:")]
        void SetPreferenceForKey(string key, [NullAllowed] string value);
    }

    // @protocol AKFAccountPreferencesDelegate <NSObject>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAccountPreferencesDelegate
    {
        // @optional -(void)accountPreferences:(AKFAccountPreferences * _Nonnull)accountPreferences didDeletePreferenceForKey:(NSString * _Nonnull)key error:(NSError * _Nullable)error;
        [Export("accountPreferences:didDeletePreferenceForKey:error:")]
        void DidDeletePreferenceForKey(AKFAccountPreferences accountPreferences, string key, [NullAllowed] NSError error);

        // @optional -(void)accountPreferences:(AKFAccountPreferences * _Nonnull)accountPreferences didLoadPreferences:(NSDictionary<NSString *,NSString *> * _Nullable)preferences error:(NSError * _Nullable)error;
        [Export("accountPreferences:didLoadPreferences:error:")]
        void DidLoadPreferences(AKFAccountPreferences accountPreferences, [NullAllowed] NSDictionary<NSString, NSString> preferences, [NullAllowed] NSError error);

        // @optional -(void)accountPreferences:(AKFAccountPreferences * _Nonnull)accountPreferences didLoadPreferenceForKey:(NSString * _Nonnull)key value:(NSString * _Nullable)value error:(NSError * _Nullable)error;
        [Export("accountPreferences:didLoadPreferenceForKey:value:error:")]
        void DidLoadPreferenceForKey(AKFAccountPreferences accountPreferences, string key, [NullAllowed] string value, [NullAllowed] NSError error);

        // @optional -(void)accountPreferences:(AKFAccountPreferences * _Nonnull)accountPreferences didSetPreferenceForKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value error:(NSError * _Nullable)error;
        [Export("accountPreferences:didSetPreferenceForKey:value:error:")]
        void DidSetPreferenceForKey(AKFAccountPreferences accountPreferences, string key, string value, [NullAllowed] NSError error);
    }

    [Static]
    partial interface Constants
    {
        // extern const NSUInteger AKFButtonTypeCount;
        [Field("AKFButtonTypeCount", "__Internal")]
        nuint AKFButtonTypeCount { get; }
    }

    partial interface Constants
    {
        // extern const NSUInteger AKFLoginFlowStateCount;
        [Field("AKFLoginFlowStateCount", "__Internal")]
        nuint AKFLoginFlowStateCount { get; }
    }

    partial interface Constants
    {
        // extern const NSUInteger AKFTextPositionCount;
        [Field("AKFTextPositionCount", "__Internal")]
        nuint AKFTextPositionCount { get; }
    }

    // @protocol AKFAdvancedUIActionController <NSObject>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAdvancedUIActionController
    {
        // @required -(void)back;
        [Abstract]
        [Export("back")]
        void Back();

        // @required -(void)cancel;
        [Abstract]
        [Export("cancel")]
        void Cancel();
    }

    // @protocol AKFAdvancedUIManager <NSObject>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAdvancedUIManager
    {
        // @optional -(UIView * _Nullable)actionBarViewForState:(AKFLoginFlowState)state;
        [Export("actionBarViewForState:")]
        [return: NullAllowed]
        UIView ActionBarViewForState(AKFLoginFlowState state);

        // @optional -(UIView * _Nullable)bodyViewForState:(AKFLoginFlowState)state;
        [Export("bodyViewForState:")]
        [return: NullAllowed]
        UIView BodyViewForState(AKFLoginFlowState state);

        // @optional -(AKFButtonType)buttonTypeForState:(AKFLoginFlowState)state;
        [Export("buttonTypeForState:")]
        AKFButtonType ButtonTypeForState(AKFLoginFlowState state);

        // @optional -(UIView * _Nullable)footerViewForState:(AKFLoginFlowState)state;
        [Export("footerViewForState:")]
        [return: NullAllowed]
        UIView FooterViewForState(AKFLoginFlowState state);

        // @optional -(UIView * _Nullable)headerViewForState:(AKFLoginFlowState)state;
        [Export("headerViewForState:")]
        [return: NullAllowed]
        UIView HeaderViewForState(AKFLoginFlowState state);

        // @optional -(void)setActionController:(id<AKFAdvancedUIActionController> _Nonnull)actionController;
        [Export("setActionController:")]
        void SetActionController(AKFAdvancedUIActionController actionController);

        // @optional -(void)setError:(NSError * _Nonnull)error;
        [Export("setError:")]
        void SetError(NSError error);

        // @optional -(AKFTextPosition)textPositionForState:(AKFLoginFlowState)state;
        [Export("textPositionForState:")]
        AKFTextPosition TextPositionForState(AKFLoginFlowState state);
    }

    // @protocol AKFAdvancedUIManaging <NSObject>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFAdvancedUIManaging
    {
        // @required @property (nonatomic, strong) id<AKFAdvancedUIManager> advancedUIManager;
        [Abstract]
        [Export("advancedUIManager", ArgumentSemantic.Strong)]
        AKFAdvancedUIManager AdvancedUIManager { get; set; }
    }

    // @protocol AKFConfiguring
    [Protocol, Model]
    interface AKFConfiguring
    {
        // @required @property (copy, nonatomic) NSArray<NSString *> * blacklistedCountryCodes;
        [Abstract]
        [Export("blacklistedCountryCodes", ArgumentSemantic.Copy)]
        string[] BlacklistedCountryCodes { get; set; }

        // @required @property (copy, nonatomic) NSString * defaultCountryCode;
        [Abstract]
        [Export("defaultCountryCode")]
        string DefaultCountryCode { get; set; }

        // @required @property (nonatomic) BOOL enableSendToFacebook;
        [Abstract]
        [Export("enableSendToFacebook")]
        bool EnableSendToFacebook { get; set; }

        // @required @property (copy, nonatomic) NSArray<NSString *> * whitelistedCountryCodes;
        [Abstract]
        [Export("whitelistedCountryCodes", ArgumentSemantic.Copy)]
        string[] WhitelistedCountryCodes { get; set; }
    }

    // @protocol AKFTheming
    [Protocol, Model]
    interface AKFTheming
    {
        // @required @property (copy, nonatomic) AKFTheme * _Null_unspecified theme __attribute__((annotate("ui_appearance_selector")));
        [Abstract]
        [Export("theme", ArgumentSemantic.Copy)]
        AKFTheme Theme { get; set; }
    }

    // @protocol AKFViewController <AKFAdvancedUIManaging, AKFConfiguring, AKFTheming>
    [Protocol, Model]
    interface AKFViewController : AKFAdvancedUIManaging, AKFConfiguring, AKFTheming
    {
        [Wrap("WeakDelegate"), Abstract]
        AKFViewControllerDelegate Delegate { get; set; }

        // @required @property (nonatomic, weak) id<AKFViewControllerDelegate> delegate;
        [Abstract]
        [NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
        NSObject WeakDelegate { get; set; }

        // @required @property (readonly, assign, nonatomic) AKFLoginType loginType;
        [Abstract]
        [Export("loginType", ArgumentSemantic.Assign)]
        AKFLoginType LoginType { get; }
    }

    // @protocol AKFViewControllerDelegate <NSObject>
    [Protocol, Model]
    [BaseType(typeof(NSObject))]
    interface AKFViewControllerDelegate
    {
        // @optional -(void)viewController:(UIViewController<AKFViewController> *)viewController didCompleteLoginWithAuthorizationCode:(NSString *)code state:(NSString *)state;
        [Export("viewController:didCompleteLoginWithAuthorizationCode:state:")]
    void ViewController(AKFViewController viewController, string code, string state);

        // @optional -(void)viewController:(UIViewController<AKFViewController> *)viewController didCompleteLoginWithAccessToken:(id<AKFAccessToken>)accessToken state:(NSString *)state;
        [Export("viewController:didCompleteLoginWithAccessToken:state:")]
        void ViewController(AKFViewController viewController, AKFAccessToken accessToken, string state);

        // @optional -(void)viewController:(UIViewController<AKFViewController> *)viewController didFailWithError:(NSError *)error;
        [Export("viewController:didFailWithError:")]
        void ViewController(AKFViewController viewController, NSError error);

        // @optional -(void)viewControllerDidCancel:(UIViewController<AKFViewController> *)viewController;
        [Export("viewControllerDidCancel:")]
        void ViewControllerDidCancel(AKFViewController viewController);
    }

    // typedef void (^AKFRequestAccountHandler)(id<AKFAccount> _Nullable, NSError * _Nullable);
    delegate void AKFRequestAccountHandler([NullAllowed] AKFAccount arg0, [NullAllowed] NSError arg1);

    // @interface AKFAccountKit : NSObject
    [BaseType(typeof(NSObject))]
    [DisableDefaultCtor]
    interface AKFAccountKit
    {
        // +(NSString * _Nonnull)graphVersionString;
        [Static]
        [Export("graphVersionString")]
        string GraphVersionString { get; }

        // +(NSString * _Nonnull)versionString;
        [Static]
        [Export("versionString")]
        string VersionString { get; }

        // @property (readonly, copy, nonatomic) id<AKFAccessToken> _Nullable currentAccessToken;
        [NullAllowed, Export("currentAccessToken", ArgumentSemantic.Copy)]
        AKFAccessToken CurrentAccessToken { get; }

        // -(instancetype _Nonnull)initWithResponseType:(AKFResponseType)responseType __attribute__((objc_designated_initializer));
        [Export("initWithResponseType:")]
        [DesignatedInitializer]
        IntPtr Constructor(AKFResponseType responseType);

        // -(AKFAccountPreferences * _Nullable)accountPreferences;
        [NullAllowed, Export("accountPreferences")]
        AKFAccountPreferences AccountPreferences { get; }

        // -(void)cancelLogin;
        [Export("cancelLogin")]
        void CancelLogin();

        // -(void)logOut;
        [Export("logOut")]
        void LogOut();

        // -(void)requestAccount:(AKFRequestAccountHandler _Nonnull)handler;
        [Export("requestAccount:")]
        void RequestAccount(AKFRequestAccountHandler handler);

        // -(UIViewController<AKFViewController> * _Nonnull)viewControllerForEmailLogin;
        [Export("viewControllerForEmailLogin")]
        AKFViewController ViewControllerForEmailLogin { get; }

        // -(UIViewController<AKFViewController> * _Nonnull)viewControllerForEmailLoginWithEmail:(NSString * _Nullable)email state:(NSString * _Nullable)state;
        [Export("viewControllerForEmailLoginWithEmail:state:")]
        AKFViewController ViewControllerForEmailLoginWithEmail([NullAllowed] string email, [NullAllowed] string state);

        // -(UIViewController<AKFViewController> * _Nonnull)viewControllerForPhoneLogin;
        [Export("viewControllerForPhoneLogin")]
        AKFViewController ViewControllerForPhoneLogin { get; }

        // -(UIViewController<AKFViewController> * _Nonnull)viewControllerForPhoneLoginWithPhoneNumber:(AKFPhoneNumber * _Nullable)phoneNumber state:(NSString * _Nullable)state;
        [Export("viewControllerForPhoneLoginWithPhoneNumber:state:")]
        AKFViewController ViewControllerForPhoneLoginWithPhoneNumber([NullAllowed] AKFPhoneNumber phoneNumber, [NullAllowed] string state);

        // -(UIViewController<AKFViewController> * _Nullable)viewControllerForLoginResume;
        [NullAllowed, Export("viewControllerForLoginResume")]
        AKFViewController ViewControllerForLoginResume { get; }
    }

    partial interface Constants
    {
        // extern NSString *const _Nonnull AKFErrorDomain;
        [Field("AKFErrorDomain", "__Internal")]
        NSString AKFErrorDomain { get; }

        // extern NSString *const _Nonnull AKFErrorDeveloperMessageKey;
        [Field("AKFErrorDeveloperMessageKey", "__Internal")]
        NSString AKFErrorDeveloperMessageKey { get; }

        // extern NSString *const _Nonnull AKFErrorUserMessageKey;
        [Field("AKFErrorUserMessageKey", "__Internal")]
        NSString AKFErrorUserMessageKey { get; }

        // extern NSString *const _Nonnull AKFErrorObjectKey;
        [Field("AKFErrorObjectKey", "__Internal")]
        NSString AKFErrorObjectKey { get; }
   }

    partial interface Constants
    {
        // extern NSString *const _Nonnull AKFServerErrorDomain;
        [Field("AKFServerErrorDomain", "__Internal")]
        NSString AKFServerErrorDomain { get; }
    }

    // @interface AKFPhoneNumber : NSObject <NSCopying, NSSecureCoding>
    [BaseType(typeof(NSObject))]
    [DisableDefaultCtor]
    interface AKFPhoneNumber : INSCopying, INSSecureCoding
    {
        // -(instancetype _Nonnull)initWithCountryCode:(NSString * _Nonnull)countryCode phoneNumber:(NSString * _Nonnull)phoneNumber __attribute__((objc_designated_initializer));
        [Export("initWithCountryCode:phoneNumber:")]
        [DesignatedInitializer]
        IntPtr Constructor(string countryCode, string phoneNumber);

        // @property (readonly, copy, nonatomic) NSString * _Nonnull countryCode;
        [Export("countryCode")]
        string CountryCode { get; }

        // @property (readonly, copy, nonatomic) NSString * _Nonnull phoneNumber;
        [Export("phoneNumber")]
        string PhoneNumber { get; }

        // -(BOOL)isEqualToPhoneNumber:(AKFPhoneNumber * _Nonnull)phoneNumber;
        [Export("isEqualToPhoneNumber:")]
        bool IsEqualToPhoneNumber(AKFPhoneNumber phoneNumber);

        // -(NSString * _Nonnull)stringRepresentation;
        [Export("stringRepresentation")]
        string StringRepresentation { get; }
    }

    // @interface AKFSettings : NSObject
    [BaseType(typeof(NSObject))]
    interface AKFSettings
    {
        // +(NSString * _Nonnull)clientToken;
        // +(void)setClientToken:(NSString * _Nonnull)clientToken;
        [Static]
        [Export("clientToken")]
        string ClientToken { get; set; }
    }

    partial interface Constants
    {
        // extern const NSUInteger AKFHeaderTextTypeCount;
        [Field("AKFHeaderTextTypeCount", "__Internal")]
        nuint AKFHeaderTextTypeCount { get; }
    }

    // @interface AKFTheme : NSObject <NSCopying>
    [BaseType(typeof(NSObject))]
    interface AKFTheme : INSCopying
    {
        // +(instancetype _Nonnull)defaultTheme;
        [Static]
        [Export("defaultTheme")]
        AKFTheme DefaultTheme();

        // +(instancetype _Nonnull)outlineTheme;
        [Static]
        [Export("outlineTheme")]
        AKFTheme OutlineTheme();

        // +(instancetype _Nonnull)outlineThemeWithPrimaryColor:(UIColor * _Nonnull)primaryColor primaryTextColor:(UIColor * _Nonnull)primaryTextColor secondaryTextColor:(UIColor * _Nonnull)secondaryTextColor statusBarStyle:(UIStatusBarStyle)statusBarStyle;
        [Static]
        [Export("outlineThemeWithPrimaryColor:primaryTextColor:secondaryTextColor:statusBarStyle:")]
        AKFTheme OutlineThemeWithPrimaryColor(UIColor primaryColor, UIColor primaryTextColor, UIColor secondaryTextColor, UIStatusBarStyle statusBarStyle);

        // +(instancetype _Nonnull)themeWithPrimaryColor:(UIColor * _Nonnull)primaryColor primaryTextColor:(UIColor * _Nonnull)primaryTextColor secondaryColor:(UIColor * _Nonnull)secondaryColor secondaryTextColor:(UIColor * _Nonnull)secondaryTextColor statusBarStyle:(UIStatusBarStyle)statusBarStyle;
        [Static]
        [Export("themeWithPrimaryColor:primaryTextColor:secondaryColor:secondaryTextColor:statusBarStyle:")]
        AKFTheme ThemeWithPrimaryColor(UIColor primaryColor, UIColor primaryTextColor, UIColor secondaryColor, UIColor secondaryTextColor, UIStatusBarStyle statusBarStyle);

        // @property (copy, nonatomic) UIColor * _Nonnull backgroundColor;
        [Export("backgroundColor", ArgumentSemantic.Copy)]
        UIColor BackgroundColor { get; set; }

        // @property (copy, nonatomic) UIImage * _Nullable backgroundImage;
        [NullAllowed, Export("backgroundImage", ArgumentSemantic.Copy)]
        UIImage BackgroundImage { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonBackgroundColor;
        [Export("buttonBackgroundColor", ArgumentSemantic.Copy)]
        UIColor ButtonBackgroundColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonBorderColor;
        [Export("buttonBorderColor", ArgumentSemantic.Copy)]
        UIColor ButtonBorderColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonDisabledBackgroundColor;
        [Export("buttonDisabledBackgroundColor", ArgumentSemantic.Copy)]
        UIColor ButtonDisabledBackgroundColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonDisabledBorderColor;
        [Export("buttonDisabledBorderColor", ArgumentSemantic.Copy)]
        UIColor ButtonDisabledBorderColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonDisabledTextColor;
        [Export("buttonDisabledTextColor", ArgumentSemantic.Copy)]
        UIColor ButtonDisabledTextColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonHighlightedBackgroundColor;
        [Export("buttonHighlightedBackgroundColor", ArgumentSemantic.Copy)]
        UIColor ButtonHighlightedBackgroundColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonHighlightedBorderColor;
        [Export("buttonHighlightedBorderColor", ArgumentSemantic.Copy)]
        UIColor ButtonHighlightedBorderColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonHighlightedTextColor;
        [Export("buttonHighlightedTextColor", ArgumentSemantic.Copy)]
        UIColor ButtonHighlightedTextColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull buttonTextColor;
        [Export("buttonTextColor", ArgumentSemantic.Copy)]
        UIColor ButtonTextColor { get; set; }

        // @property (assign, nonatomic) NSUInteger contentBodyLayoutWeight;
        [Export("contentBodyLayoutWeight")]
        nuint ContentBodyLayoutWeight { get; set; }

        // @property (assign, nonatomic) NSUInteger contentBottomLayoutWeight;
        [Export("contentBottomLayoutWeight")]
        nuint ContentBottomLayoutWeight { get; set; }

        // @property (assign, nonatomic) NSUInteger contentFooterLayoutWeight;
        [Export("contentFooterLayoutWeight")]
        nuint ContentFooterLayoutWeight { get; set; }

        // @property (assign, nonatomic) NSUInteger contentHeaderLayoutWeight;
        [Export("contentHeaderLayoutWeight")]
        nuint ContentHeaderLayoutWeight { get; set; }

        // @property (assign, nonatomic) CGFloat contentMarginLeft;
        [Export("contentMarginLeft")]
        nfloat ContentMarginLeft { get; set; }

        // @property (assign, nonatomic) CGFloat contentMarginRight;
        [Export("contentMarginRight")]
        nfloat ContentMarginRight { get; set; }

        // @property (assign, nonatomic) CGFloat contentMaxWidth;
        [Export("contentMaxWidth")]
        nfloat ContentMaxWidth { get; set; }

        // @property (assign, nonatomic) CGFloat contentMinHeight;
        [Export("contentMinHeight")]
        nfloat ContentMinHeight { get; set; }

        // @property (assign, nonatomic) NSUInteger contentTextLayoutWeight;
        [Export("contentTextLayoutWeight")]
       nuint ContentTextLayoutWeight { get; set; }

        // @property (assign, nonatomic) NSUInteger contentTopLayoutWeight;
        [Export("contentTopLayoutWeight")]
        nuint ContentTopLayoutWeight { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull headerBackgroundColor;
        [Export("headerBackgroundColor", ArgumentSemantic.Copy)]
        UIColor HeaderBackgroundColor { get; set; }

        // @property (nonatomic, strong) UIColor * _Nonnull headerButtonTextColor;
        [Export("headerButtonTextColor", ArgumentSemantic.Strong)]
        UIColor HeaderButtonTextColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull headerTextColor;
        [Export("headerTextColor", ArgumentSemantic.Copy)]
        UIColor HeaderTextColor { get; set; }

         // @property (assign, nonatomic) AKFHeaderTextType headerTextType;
        [Export("headerTextType", ArgumentSemantic.Assign)]
        AKFHeaderTextType HeaderTextType { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull iconColor;
        [Export("iconColor", ArgumentSemantic.Copy)]
        UIColor IconColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull inputBackgroundColor;
        [Export("inputBackgroundColor", ArgumentSemantic.Copy)]
        UIColor InputBackgroundColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull inputBorderColor;
        [Export("inputBorderColor", ArgumentSemantic.Copy)]
        UIColor InputBorderColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull inputTextColor;
        [Export("inputTextColor", ArgumentSemantic.Copy)]
        UIColor InputTextColor { get; set; }

        // @property (assign, nonatomic) UIStatusBarStyle statusBarStyle;
        [Export("statusBarStyle", ArgumentSemantic.Assign)]
        UIStatusBarStyle StatusBarStyle { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull textColor;
        [Export("textColor", ArgumentSemantic.Copy)]
        UIColor TextColor { get; set; }

        // @property (copy, nonatomic) UIColor * _Nonnull titleColor;
        [Export("titleColor", ArgumentSemantic.Copy)]
        UIColor TitleColor { get; set; }

        // -(BOOL)isEqualToTheme:(AKFTheme * _Nonnull)theme;
        [Export("isEqualToTheme:")]
        bool IsEqualToTheme(AKFTheme theme);
    }

}

And here is the "structs.cs" code of Objective Sharpie.

using System;
using ObjCRuntime;

namespace AccountKit
{
[Native]
public enum AKFResponseType : ulong
{
    AccessToken = 0,
    uthorizationCode
}

[Native]
public enum AKFButtonType : ulong
{
    Default = 0,
    Begin,
    Confirm,
    Continue,
    LogIn,
    Next,
    Ok,
    Send,
    Start,
    Submit
}

[Native]
public enum AKFLoginFlowState : ulong
{
    None = 0,
    PhoneNumberInput,
    EmailInput,
    EmailVerify,
    SendingCode,
    SentCode,
    CodeInput,
    VerifyingCode,
    Verified,
    Error,
    ResendCode
}

[Native]
public enum AKFTextPosition : ulong
{
    Default = 0,
    AboveBody,
    BelowBody
}

[Native]
public enum AKFLoginType : ulong
{
    Email = 0,
    Phone
}

[Native]
public enum AKFErrorCode : int
{
    NetworkConnectionError = 100,
    ServerError = 200,
    LoginRequestInvalidatedError = 300,
    InvalidParameterValueError = 400
}

[Native]
public enum AKFServerErrorCode : int
{
    AKFInvalidServerParameterValueError = 201
}

[Native]
public enum AKFLoginRequestInvalidatedErrorCode : int
{
    AKFLoginRequestExpiredError = 301
}

[Native]
public enum AKFInvalidParameterValueErrorCode : int
{
    InvalidEmailAddressError = 401,
    InvalidPhoneNumberError = 402,
    InvalidCodingValueError = 403,
    InvalidAccessTokenError = 404,
    InvalidAccountPreferenceKeyError = 405,
    InvalidAccountPreferenceValueError = 406,
    OperationNotSuccessful = 407
}

[Native]
public enum AKFServerResponseErrorCode : int
{
    AKFServerResponseErrorCodeInvalidConfirmationCode = 15003
}

[Native]
public enum AKFHeaderTextType : ulong
{
    Login = 0,
    AppName
}
}
1
Did you successfully complete this, if so can you make this publicly available?S1r-Lanzelot

1 Answers

1
votes

i searched out me question and finally found the solution. So, the problem was that Objective Sharpie converts AKFViewController protocol to C# interface and AKFViewController type was used by other functions as parameters and return type. So in order to use interface type we have to make an empty interface with I prefix like:

interface IAKFViewController {}

Then use this interface type instead original Objective Sharpie generated interface.