Enumerations
The following enumerations are available globally.
-
Error subtypes of the LINE SDK, which are related to certificates, keys, and token verification. A
CryptoErrorwill not be thrown to you directly. This type of error will be wrapped underLineSDKError.authorizeFailedwith the.cryptoErrorreason and the error code3016. Find the underlyingCryptoErrorby checking the associated value of the.cryptoErrorreason or the.underlyingErrorkey 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
localizedDescriptionproperty to get a human-readable text description. AccesserrorCodeto get a fixed error code to identify the error type quickly. AllCryptoErrors 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 : Errorextension CryptoError: LocalizedErrorextension 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
localizedDescriptionproperty to get a human-readable text description. AccesserrorCodeto get a fixed error code to identify the error type quickly. AllLineSDKErrors 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 : Errorextension LineSDKError: LocalizedErrorextension 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
AuthorizationStatusvalue 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 theAPIis equivalent to using and sending an underlyingRequestobject with aSessionobject. However, some methods inAPIprovide additional useful features such as working with the keychain and redirecting the final result in a more reasonable way.Using methods in
See moreAPIto 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
ResponsePipelineRedirectorobject. 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
Sessionobject. To convert data to aResponseobject, the last pipeline must be aterminatorpipeline. To process data, you can have multipleredirectorpipelines before theterminatorpipeline.- terminator: Associates a pipeline with a
ResponsePipelineTerminatorobject to terminate the current handling process. - redirector: Associates a pipeline with a
ResponsePipelineRedirectorobject 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.mainwith theasyncbehavior. - currentMainOrAsync: Dispatches a call to
DispatchQueue.mainwith theasyncbehavior 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
DispatchQueueobject. - operation: Uses a specified
OperationQueueobject 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 moreResulttype.Declaration
Swift
public enum ResultUtil
View on GitHub
Enumerations Reference