Authorization

  • Manages initialization and authorization for Reader SDK.

    Warning

    You must initialize Reader SDK before attempting any other operation.

    Warning

    All methods on this class must be called from the main thread.

    See

    SQRDReaderSettingsController

    See

    SQRDCheckoutController
    See more

    Declaration

    Objective-C

    @interface SQRDReaderSDK : NSObject

    Swift

    class SQRDReaderSDK : NSObject
  • A completion handler that handles the result of an authorization attempt.

    Declaration

    Objective-C

    typedef void (^SQRDAuthorizationHandler)(SQRDLocation *_Nullable,
                                             NSError *_Nullable)

    Swift

    typealias SQRDAuthorizationHandler = (SQRDLocation?, Error?) -> Void

    Parameters

    location

    The authorized location when authorization succeeds, nil when authorization fails.

    error

    An error with domain SQRDAuthorizationErrorDomain when authorization fails; otherwise, nil. See SQRDAuthorizationError for possible error types.

  • The types of errors that can occur when attempting to authorize Reader SDK.

    See more

    Declaration

    Objective-C

    enum SQRDAuthorizationError {}

    Swift

    typealias SQRDAuthorizationError.Code._ErrorType = SQRDAuthorizationError
  • The authorization error domain.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SQRDAuthorizationErrorDomain

    Swift

    let SQRDAuthorizationErrorDomain: String
  • A completion handler that handles the result of a deauthorization attempt.

    Declaration

    Objective-C

    typedef void (^SQRDDeauthorizationHandler)(NSError *_Nullable)

    Swift

    typealias SQRDDeauthorizationHandler = (Error?) -> Void

    Parameters

    error

    An error with domain SQRDDeauthorizationErrorDomain when deauthorization fails; otherwise, nil. See SQRDDeauthorizationError for possible error types.

  • The types of errors that can occur when attempting to deauthorize Reader SDK.

    See more

    Declaration

    Objective-C

    enum SQRDDeauthorizationError {}

    Swift

    typealias SQRDDeauthorizationError.Code._ErrorType = SQRDDeauthorizationError
  • The deauthorization error domain.

    Declaration

    Objective-C

    extern NSString *const _Nonnull SQRDDeauthorizationErrorDomain

    Swift

    let SQRDDeauthorizationErrorDomain: String