MLSmsCodeUtils Class Reference

Inherits from NSObject
Declared in MLSmsCodeUtils.h

Overview

The MLSmsCodeUtils provides utility functions for using sms verification system.

+ requestSmsCodeWithPhoneNumber:block:

Send a sms code to the mobile phone with phoneNumber.

+ (void)requestSmsCodeWithPhoneNumber:(NSString *)phoneNumber block:(nullable MLBooleanResultBlock)block

Parameters

phoneNumber

Phone number to receive the code.

block

The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)

Declared In

MLSmsCodeUtils.h

+ verifySmsCode:phoneNumber:block:

Verify that the smsCode was sent by invoking requestSmsCodeWithPhoneNumber:block: and is valid(alive and not be used).

+ (void)verifySmsCode:(NSString *)smsCode phoneNumber:(NSString *)phoneNumber block:(nullable MLBooleanResultBlock)block

Parameters

smsCode

sms code provided by the user

phoneNumber

user’s phone number

block

The block to execute. The block should have the following argument signature: (BOOL succeeded, NSError *error)

Declared In

MLSmsCodeUtils.h