美文网首页
leancloud (存储,短信验证)

leancloud (存储,短信验证)

作者: 孟维学 | 来源:发表于2016-07-22 12:03 被阅读99次

#import"ViewController.h"

#import

#import

@interfaceViewController()

@property(weak,nonatomic)IBOutletUITextField*textfield;

@end

@implementationViewController

- (void)viewDidLoad {

[superviewDidLoad];

//保存

AVObject*post=[AVObjectobjectWithClassName:@"Post"];

[postsetObject:@"wei"forKey:@"haha"];

[postsetObject:@"meng"forKey:@"heihei"];

[postsetObject:@"xue"forKey:@"woyun"];

[postsave];

//检索

AVQuery*query=[AVQueryqueryWithClassName:@"Post"];

AVObject*post1=[querygetObjectWithId:@"45iit23sx8hr6ev1jyf97yc47j7xjn9kblf4sqsb6uj40tg9"];

NSString*s1=[post1objectForKey:@"heihei"];

NSLog(@"%@",s1);

[postdeleteInBackground];

}

//请求验证码

- (IBAction)sendpassword:(id)sender {

[AVOSCloud requestSmsCodeWithPhoneNumber:@"13240109524"appName:@"秒"operation:@"注册"timeToLive:10callback:^(BOOLsucceeded, NSError *error) {

if(succeeded) {

NSLog(@"成功");

}

if(error) {

NSLog(@"error");

}

}];

}

//验证验证码

- (IBAction)sendmessage:(id)sender {

[AVOSCloud verifySmsCode:self.textfield.text mobilePhoneNumber:@"13240109524"callback:^(BOOLsucceeded, NSError *error) {

if(succeeded) {

NSLog(@"验证成功");

}

}];

}

- (IBAction)message:(id)sender {

}

- (void)didReceiveMemoryWarning {

[superdidReceiveMemoryWarning];

// Dispose of any resources that can be recreated.

}

@end

相关文章

  • leancloud (存储,短信验证)

    #import"ViewController.h" #import #import @interfaceViewC...

  • 配置LeanClond实现服务端

    一. 介绍: 「leancloud」(https://leancloud.cn)是一个云端服务器存储工具。提供各种...

  • 短信验证

    一、短信验证 验证方式有很多种:短信验证码,邮箱验证,语音验证,图片验证等等。其中短信验证,语音验证,邮箱验证都是...

  • 关于session存储短信验证码的问题

    给安卓写短信验证接口,用session存储手机验证码,在本人电脑用url请求收到的验证码去注册,是可以成功的,然后...

  • shareSDK短信验证

    用户登录 短信验证步骤 用户登录模块采用短信验证的方式,登录用户,所以采用sharesdk进行短信验证 1 短信注...

  • 生产力工具之云片短信平台-模板管理

    四步搞定短信验证码如何搞定短信验证码签名和模板如何使用云片API发送短信验证码Java实现短信验证码和国际短信群发...

  • 微信小程序云开发,快速生成短信验证码

    使用微信小程序云函数实现注册短信验证码的管理,并不是一件分分钟的事,目前想要存储验证码只能放到数据库中,因为存储后...

  • 短信API实现自动化短信发送

    短信验证码接口示例,如何接入短信API接口实现短信自动发送功能; 网站如何实现自动发送短信验证码的功能,短信验证码...

  • 接入短信API,免费试用

    短信验证码接口示例,如何接入短信API接口实现短信自动发送功能; 网站如何实现自动发送短信验证码的功能,短信验证码...

  • mob短信登录(Android)

    短信验证(Android) 介绍 什么是短信验证:    短信验证是企业给消费者(用户)的一个凭证,通过短信内容的...

网友评论

      本文标题:leancloud (存储,短信验证)

      本文链接:https://www.haomeiwen.com/subject/xldijttx.html