为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

用免费短信验证码SDK实现手机注册验证功能

2017-11-26 15页 doc 81KB 33阅读

用户头像

is_196623

暂无简介

举报
用免费短信验证码SDK实现手机注册验证功能用免费短信验证码SDK实现手机注册验证功能 用免费短信验证码SDK实现手机注册验证功能 第一步 获取短信SDK 请到Mob官网下载最新版本的SDK,下载回来后解压,可以看到下面的文件结构: 链接: 其中SMS_SDK.framework 为依赖库文件 SMS_SDKDemo 为示例demo ,其中保存了短信SDK的演示项目代码。 第二步 导入SDK 短信SDK 使用如下方式完成集成。具体步骤如下: 将SMS_SDK.framework 文件 直接拖入项目中 school)], 4 4 house building ...
用免费短信验证码SDK实现手机注册验证功能
用免费短信验证码SDK实现手机注册验证功能 用免费短信验证码SDK实现手机注册验证功能 第一步 获取短信SDK 请到Mob官网下载最新版本的SDK,下载回来后解压,可以看到下面的文件结构: 链接: 其中SMS_SDK.framework 为依赖库文件 SMS_SDKDemo 为示例demo ,其中保存了短信SDK的演示项目代码。 第二步 导入SDK 短信SDK 使用如下方式完成集成。具体步骤如下: 将SMS_SDK.framework 文件 直接拖入项目中 school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification 第三步 添加依赖库文件 第四步 添加代码 1 在appDelegate 添加 1#import school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification 2 在 1- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 添加 //初始化短信SDK demo 并未提供短信SDK appkey 和 appsecret 请用户到#/ 这里申请 注意:是在短信验证SDK后台申请 1[ SMS_SDK registerApp:appKey withSecret:appSecret]; 第五步 添加UI事件响应 弹出注册界面和通讯录好友界面 1 弹出注册页面 1- (IBAction)registerUser:(id)sender { 2 RegViewController* reg=[[RegViewController alloc] init]; 3 [self presentViewController:reg animated:YES completion:^{ 4 5 }]; 6} 2 弹出通讯录好友界面 Objective-C 1- (IBAction)getAddressBookFriends:(id)sender { 2 NSLog(@"show my friends"); 3 [_testView setNumber:0]; 4 5 SectionsViewControllerFriends* friends=[[SectionsViewControllerFriends alloc] init]; 6 _friendsController=friends; 7 8 [_friendsController setMyBlock:_friendsBlock]; 9 10 [SMS_MBProgressHUD showMessag:@"正在加载中..." toView:self.view]; 11 12 [SMS_SDK getAppContactFriends:1 result:^(enum SMS_ResponseState state, NSArray *array) { 13 if (1==state) 14 { 15 NSLog(@"block 获取好友列表成功"); 16 17 [_friendsController setMyData:array]; 18 [self presentViewController:_friendsController animated:YES completion:^{ 19 ; 20 }]; 21 } 22 else if(0==state) 23 { school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification 24 NSLog(@"block 获取好友列表失败"); 25 } 26 }]; 27} 附录: UI介绍 UI文件夹下包含所用到的图片资源和界面UI Smssdk.bundle 为图片资源 其他文件 为界面UI 1、注册界面 RegViewController,在事件响应中 弹出该控制器即可 进入该界面后 点击国家和地区 会进入 选择 国家和地区的选项 相对应的控制器为SectionsViewController,在该控制器会从服务端 获取SDK 所支持的国家 和地区。 用户在注册页面输入手机号码之后 点击下一步服务端 会发送短信验证码 界面会跳转到短信验证界面 该界面对应的控制器为VerifyViewController 主要处理短信的验证功能 2、通讯录好友界面 SectionsViewControllerFriends,在事件响应中 弹出该好友控制器即可 进入该界面后 会把 通讯录的好友分为两类: 已加入的用户:可以点击添加按钮 直接去添加已加入该app的通讯录好友 待邀请的用户:可以点击按钮 发送短信 邀请好友加入该app API介绍 2 /** 3* @brief 注册应用,此在应用启动时调用一次并且只能在主线程调用。 4 * @param appKey ,应用key,在shareSDK官网中注册的应用Key 5 * @param appSecret 应用秘钥,在shareSDK官网中注册的应用秘钥 6*/ 7+ (void)registerApp:(NSString*)appKey withSecret:(NSString*)appSecret; 8 9 /** 10* @brief 获取appkey。 11* @return 返回appkey 12 */ 13+ (NSString*)appKey; 14 15/** 16* @brief 获取appsecret。 17* @return 返回appsecret 18* / 19+ (NSString*)appSecret; 20 21/** 22* @brief 获取通讯录数据 school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification 23* @return 返回的数组里面存储的数据类型是SMS_AddressBook 24*/ 25+ (NSMutableArray*)addressBook; 26 27/** 28* @brief 发送短信。 29* @param 要发送短信的号码 30*/ 31 32+ (void)sendSMS:(NSString*)tel; 33 34/** 35* @brief 向服务端请求获取通讯录好友信息。 36* @param 调用参数 默认填choose=1 37* @param 请求结果回调block 38*/ 39+ (void)getAppContactFriends:(int)choose 40result :(GetAppContactFriendsBlock)result; 41 42/** 43* @brief 获取验证码。 44* @param 电话号码 45 * @param 区号 46* @param 请求结果回调block 47*/ 48+ (void)getVerifyCodeByPhoneNumber:(NSString*) phone 49AndZone :(NSString*) zone 50r esult:(GetVerifyCodeBlock)result; 51 52/** 53* @brief 提交验证码。 54* @param 验证码 55* @param 请求结果回调block 56*/ 57+ (void)commitVerifyCode:(NSString *)code 58result :(CommitVerifyCodeBlock)result; 59 60/** 61* @brief 请求所支持的区号。 62* @param 请求结果回调block 63*/ 64+ (void)getZone:(GetZoneBlock)result; 65 66/** 67* @brief 提交用户资料。 68* @param 用户信息 69* @param 请求结果回调block school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification 70*/ 71+ (void)submitUserInfo:(SMS_UserInfo*)user 72result :(SubmitUserInfoBlock)result; 73 74/** 75* @brief 设置最近新好友条数。 76*/ 77+ (void)setLatelyFriendsCount:(int)count; 78 79/** 80* @brief 显示最近新好友条数回调。 81* @param 设置结果回调block 82*/ +(void)showFriendsBadge:(ShowNewFriendsCountBlock)result; school)], 4 4 house building as well as more than 1000 copies of books, more than 10 kinds of collection of newspapers and magazines, fires burnt down. In 1938, the Japanese learned that the national Government established in XI Tang Tomb rotten "clip" taxes, tax officers live in 8 of Yan Dong village farmers home, troops at night, Yao was burned several houses. 1938 new morning of September 18, the Japanese team went to the countryside "sweep" from the kaiyang village line to Tung Yang Jia Qiao yan Temple wall and met Yang Jia溇 Zhou Dana (male) weeks because of long-term illness and can't work in the fields, the Japanese see his face from scratch without calluses, regard him as "Shina", thrust a knife at the scene of his death. The body was stabbed 7 times, wound 13. The same day, Trang bang village heard the Japanese come to "mop-up" are hiding, mother of 9 Zhou Guanbao Zhang Aying to drill a "dry mound", was discovered by the Japanese, a shot in the end. The same day, is 7 zhouhaijiangzhi grandfather Zhou Yingbao to escape the Japanese army, was found on the road, a shot in the end. In March 1939, the Japanese army in Yan Tomb raiding, has arrested 16 people, in fengqiao cigarettes this morning bang, killing 11 people on the River, East meeting point in wood qiaotu in the afternoon killing 4 people on the Riverside. Gu Tong is a Japanese go speak the Shanghai dialect, later to be called Gu Tong as "kill left." On January 18, 1943, the elves, five thousand or six thousand, water and land go hand in hand "mop-up" jiaxing area west of the railway, Yan Tomb area fall. March 6, Niu Shan (County Government II section chief) carrying its child Niu Jun (strict Tomb seventh district Chang) and the District Assistant Yu Xuchu, and players Jin Fuqin, and Shen Baosheng, six people received Wujiang underground County Government notification
/
本文档为【用免费短信验证码SDK实现手机注册验证功能】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索