DBMobileSharedApplication

Objective-C

@interface DBMobileSharedApplication : NSObject <DBSharedApplication>

Swift

class DBMobileSharedApplication : NSObject, DBSharedApplication

Platform-specific (here, iOS) shared application.

Renders OAuth flow and implements DBSharedApplication protocol.

  • Delegate to handle loading status during auth flow.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<DBLoadingStatusDelegate> _Nullable loadingStatusDelegate;

    Swift

    weak var loadingStatusDelegate: DBLoadingStatusDelegate? { get set }
  • Full constructor.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithSharedApplication:(nonnull UIApplication *)sharedApplication
                       controller:(nonnull UIViewController *)controller
                          openURL:(void (^_Nonnull)(NSURL *_Nonnull))openURL;

    Swift

    init(sharedApplication: Any!, controller: Any!, openURL: @escaping (URL) -> Void)

    Parameters

    sharedApplication

    The UIApplication with which to render the OAuth flow.

    controller

    The UIViewController with which to render the OAuth flow. The controller reference is weakly held.

    openURL

    A wrapper around app-extension unsafe openURL call.

    Return Value

    An initialized instance.