LCSMSClient
public class LCSMSClient
Short Message Service (SMS) Client, you can use it to send short message to mobile phone.
-
requestShortMessage(application:mobilePhoneNumber: templateName: signatureName: captchaVerificationToken: variables: ) Request a short message synchronously.
Declaration
Swift
public static func requestShortMessage( application: LCApplication = .default, mobilePhoneNumber: String, templateName: String? = nil, signatureName: String? = nil, captchaVerificationToken: String? = nil, variables: LCDictionaryConvertible? = nil) -> LCBooleanResultParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number where short message will be sent to.
templateNameThe template name.
signatureNameThe signature name.
captchaVerificationTokenThe token return by captcha verification for requesting sms.
variablesThe custom variables.
-
requestShortMessage(application:mobilePhoneNumber: templateName: signatureName: captchaVerificationToken: variables: completionQueue: completion: ) Request a short message asynchronously.
Declaration
Swift
@discardableResult public static func requestShortMessage( application: LCApplication = .default, mobilePhoneNumber: String, templateName: String? = nil, signatureName: String? = nil, captchaVerificationToken: String? = nil, variables: LCDictionaryConvertible? = nil, completionQueue: DispatchQueue = .main, completion: @escaping (LCBooleanResult) -> Void) -> LCRequestParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number where short message will be sent to.
templateNameThe template name.
signatureNameThe signature name.
captchaVerificationTokenThe token return by captcha verification for requesting sms.
variablesThe custom variables.
completionQueueThe queue where
completionbe executed, default is main.completionResult callback.
-
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) -> LCBooleanResultParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number where verification code will be sent to.
applicationNameThe name of application in the short message, default is the name of application in console.
operationThe name of operation in the short message, default is “短信验证”.
timeToLiveThe time to live(unit is minute) of the verification code, default is 10 minutes.
-
requestVerificationCode(application:mobilePhoneNumber: applicationName: operation: timeToLive: completionQueue: completion: ) 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) -> LCRequestParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number where verification code will be sent to.
applicationNameThe name of application in the short message, default is the name of application in console.
operationThe name of operation in the short message, default is “短信验证”.
timeToLiveThe time to live(unit is minute) of the verification code, default is 10 minutes.
completionQueueThe queue where
completionbe executed, default is main.completionResult callback.
-
Request a voice verification code synchronously.
Declaration
Swift
public static func requestVoiceVerificationCode( application: LCApplication = .default, mobilePhoneNumber: String) -> LCBooleanResultParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number be called.
-
Request a voice verification code asynchronously.
Declaration
Swift
@discardableResult public static func requestVoiceVerificationCode( application: LCApplication = .default, mobilePhoneNumber: String, completionQueue: DispatchQueue = .main, completion: @escaping (LCBooleanResult) -> Void) -> LCRequestParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number be called.
completionQueueThe queue where
completionbe executed, default is main.completionResult callback.
-
Verify a verification code synchronously.
Declaration
Swift
public static func verifyMobilePhoneNumber( application: LCApplication = .default, _ mobilePhoneNumber: String, verificationCode: String) -> LCBooleanResultParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number which you want to verify.
verificationCodeThe verification code which sent to the mobile phone number.
-
Verify a verification code asynchronously.
Declaration
Swift
@discardableResult public static func verifyMobilePhoneNumber( application: LCApplication = .default, _ mobilePhoneNumber: String, verificationCode: String, completionQueue: DispatchQueue = .main, completion: @escaping (LCBooleanResult) -> Void) -> LCRequestParameters
applicationThe application, default is
LCApplication.default.mobilePhoneNumberThe mobile phone number which you want to verify.
verificationCodeThe verification code which sent to the mobile phone number.
completionQueueThe queue where
completionbe executed, default is main.completionResult callback.
View on GitHub
Install in Dash
LCSMSClient Class Reference