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 underLineSDKError.authorizeFailed
with the.cryptoError
reason and the error code3016
. Find the underlyingCryptoError
by checking the associated value of the.cryptoError
reason or the.underlyingError
key in the error’suserInfo
.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. AccesserrorCode
to get a fixed error code to identify the error type quickly. AllCryptoError
s 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.
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. AccesserrorCode
to get a fixed error code to identify the error type quickly. AllLineSDKError
s 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.
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.
Declaration
Swift
public enum AuthorizationStatus
-
A utility type for calling APIs on the LINE Platform.
Note
For most API calls, using the methods in theAPI
is equivalent to using and sending an underlyingRequest
object with aSession
object. However, some methods inAPI
provide additional useful features such as working with the keychain and redirecting the final result in a more reasonable way.Using methods in
See moreAPI
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.Declaration
Swift
public enum API
-
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.
Declaration
Swift
public enum ResponsePipelineRedirectorAction
-
Pipelines for a response. Pipelines take a response and its data from a
Session
object. To convert data to aResponse
object, the last pipeline must be aterminator
pipeline. To process data, you can have multipleredirector
pipelines before theterminator
pipeline.- terminator: Associates a pipeline with a
ResponsePipelineTerminator
object to terminate the current handling process. - redirector: Associates a pipeline with a
ResponsePipelineRedirector
object to redirect the current handling process.
Declaration
Swift
public enum ResponsePipeline
- terminator: Associates a pipeline with a
-
Callback queue behaviors when a closure call is dispatched.
- asyncMain: Dispatches a call to
DispatchQueue.main
with theasync
behavior. - currentMainOrAsync: Dispatches a call to
DispatchQueue.main
with theasync
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.
Declaration
Swift
public enum CallbackQueue
- asyncMain: Dispatches a call to
-
A set of convenience methods for manipulating the
See moreResult
type.Declaration
Swift
public enum ResultUtil