LCSMSClient

public class LCSMSClient

Short Message Service (SMS) Client, you can use it to send short message to mobile phone.

Request Short Message

Request Verification Code

  • Request a verification code synchronously.

    Declaration

    Swift

    public static func requestVerificationCode(
        application: LCApplication = .default,
        mobilePhoneNumber: String,
        applicationName: String? = nil,
        operation: String? = nil,
        timeToLive: UInt? = nil)
        -> LCBooleanResult

    Parameters

    application

    The application, default is LCApplication.default.

    mobilePhoneNumber

    The mobile phone number where verification code will be sent to.

    applicationName

    The name of application in the short message, default is the name of application in console.

    operation

    The name of operation in the short message, default is “短信验证”.

    timeToLive

    The time to live(unit is minute) of the verification code, default is 10 minutes.

  • Request a verification code asynchronously.

    Declaration

    Swift

    @discardableResult
    public static func requestVerificationCode(
        application: LCApplication = .default,
        mobilePhoneNumber: String,
        applicationName: String? = nil,
        operation: String? = nil,
        timeToLive: UInt? = nil,
        completionQueue: DispatchQueue = .main,
        completion: @escaping (LCBooleanResult) -> Void)
        -> LCRequest

    Parameters

    application

    The application, default is LCApplication.default.

    mobilePhoneNumber

    The mobile phone number where verification code will be sent to.

    applicationName

    The name of application in the short message, default is the name of application in console.

    operation

    The name of operation in the short message, default is “短信验证”.

    timeToLive

    The time to live(unit is minute) of the verification code, default is 10 minutes.

    completionQueue

    The queue where completion be executed, default is main.

    completion

    Result callback.

Request Voice Verification Code

Verify Verification Code