- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//初始化应用,appKey和appSecret从后台申请得
[SMSSDKregisterApp:@"f401e41d0ae8"
withSecret:@"b447f1c0d7d688b101504c24b997029e"];
// Override point for customization after application launch.
return YES;
}
#import <SMS_SDK/SMSSDK.h>
- (IBAction)getCodeClick:(id)sender {
//公司中 短信验证
//调接口 接口参数 有点电话号码等信息
//验证验证码也是调用接口 返回成功或者失败
[SMSSDKgetVerificationCodeByMethod:SMSGetCodeMethodSMSphoneNumber:@"17701310586"zone:@"86"customIdentifier:nilresult:^(NSError *error) {
if (!error)
{
NSLog(@"获取验证码成功");
}else
{
NSLog(@"获取验证码失败");
}
}];
}
- (IBAction)yanzengCodeClick:(id)sender {
[SMSSDKcommitVerificationCode:self.code.textphoneNumber:@"17701310586"zone:@"86"result:^(NSError *error) {
if (!error)
{
NSLog(@"验证验证码成功");
}else
{
NSLog(@"验证验证码失败");
}
}];
}