Enumerations

The following enumerations are available globally.

  • Error subtypes of the LINE SDK, which are related to certificates, keys, and token verification. A CryptoError will not be thrown to you directly. This type of error will be wrapped under LineSDKError.authorizeFailed with the .cryptoError reason and the error code 3016. Find the underlying CryptoError by checking the associated value of the .cryptoError reason or the .underlyingError key in the error’s userInfo.

    You can switch over to each error to find out the reason of the error and its associated information. You can also access the localizedDescription property to get a human-readable text description. Access errorCode to get a fixed error code to identify the error type quickly. All CryptoErrors are under the “LineSDKError.CryptoError” error domain.

    • algorithmsFailed: An error occurred while performing an algorithm-related operation like creating keys or verifying signed data.
    • JWTFailed: An error occurred while performing a JWT-related operation.
    • JWKFailed: An error occurred while performing a JWK-related operation.
    • generalError: An error occurred while performing another cryptography-related operation.
    See more

    Declaration

    Swift

    public enum CryptoError : Error
    extension CryptoError: LocalizedError
    extension CryptoError: CustomNSError
  • Error types returned by the LINE SDK. It encompasses different types of errors that have their own associated reasons.

    You can switch over to each error to find out the reason of the error and its associated information. You can also access the localizedDescription property to get a human-readable text description. Access errorCode to get a fixed error code to identify the error type quickly. All LineSDKErrors are under the “LineSDKError” error domain.

    • requestFailed: An error occurred while constructing a request.
    • responseFailed: An error occurred while handling a response.
    • authorizeFailed: An error occurred while authorizing a user.
    • generalError: An error occurred while performing another process in the LINE SDK.
    • untypedError: An error not defined in the LINE SDK occurred.
    See more

    Declaration

    Swift

    public enum LineSDKError : Error
    extension LineSDKError: LocalizedError
    extension LineSDKError: CustomNSError
  • Represents the authorization status for a certain action. Before creating and presenting a UI in LINE SDK, we strongly recommend checking whether your app has a valid token and the necessary permissions.

    A local authorization status checking API returns an AuthorizationStatus value to indicate the current authorization status for giving action.

    • lackOfToken: There is no valid token in the local token store. The user hasn’t logged in and authorized your app yet.
    • lackOfPermissions: There is a valid token, but it doesn’t contain the necessary permissions. The associated value is an array of LoginPermission, containing all lacking permissions.
    • authorized: The token exists locally and contains the necessary permissions.
    See more

    Declaration

    Swift

    public enum AuthorizationStatus
  • API

    A utility type for calling APIs on the LINE Platform.

    Note

    For most API calls, using the methods in the API is equivalent to using and sending an underlying Request object with a Session object. However, some methods in API provide additional useful features such as working with the keychain and redirecting the final result in a more reasonable way.

    Using methods in API to interact with the LINE Platform is highly recommended unless you are familiar with and want to extend the LINE SDK to send unimplemented API requests to the LINE Platform.

    See more

    Declaration

    Swift

    public enum API
  • HTTP methods specified in a Request object.

    • get: The GET method.
    • post: The POST method.
    • put: The PUT method.
    • delete: The DELETE method.
    See more

    Declaration

    Swift

    public enum HTTPMethod : String
  • Authentication methods specified in a Request object.

    • none: Does not use any authentication method.
    • token: Uses an OAuth 2.0 Bearer token.
    See more

    Declaration

    Swift

    public enum AuthenticateMethod
  • Content types specified in a Request object.

    • none: The request does not contain any body content.
    • formUrlEncoded: The request contains form URL encoded data.
    • json: The request contains JSON data.
    See more

    Declaration

    Swift

    public enum ContentType
  • Actions against the processing result from a ResponsePipelineRedirector object. A redirector needs to decide where to redirect the current request after data processing. These enumeration members provide data destinations and behaviors of a redirector.

    • restart: Restarts the current request with the original pipelines.
    • restartWithout: Restarts the current request without certain pipelines.
    • stop: Stops the handling process due to an error.
    • continue: Continues the handling process.
    • continueWith: Continues the handling process with modified data and response.
    See more

    Declaration

    Swift

    public enum ResponsePipelineRedirectorAction
  • Pipelines for a response. Pipelines take a response and its data from a Session object. To convert data to a Response object, the last pipeline must be a terminator pipeline. To process data, you can have multiple redirector pipelines before the terminator pipeline.

    See more

    Declaration

    Swift

    public enum ResponsePipeline
  • Callback queue behaviors when a closure call is dispatched.

    • asyncMain: Dispatches a call to DispatchQueue.main with the async behavior.
    • currentMainOrAsync: Dispatches a call to DispatchQueue.main with the async behavior if the current queue is not .main. Otherwise, calls a closure immediately in the main queue.
    • untouch: Does not change a call queue for a closure.
    • dispatch: Dispatches a call to a specified DispatchQueue object.
    • operation: Uses a specified OperationQueue object and adds a closure to the operation queue.
    See more

    Declaration

    Swift

    public enum CallbackQueue
  • A set of convenience methods for manipulating the Result type.

    See more

    Declaration

    Swift

    public enum ResultUtil