File tree Expand file tree Collapse file tree 5 files changed +30
-9
lines changed
Expand file tree Collapse file tree 5 files changed +30
-9
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,20 @@ class LCUserTestCase: BaseTestCase {
1515 static let testablePhoneNumber = " +8618622223333 "
1616 static let testableSMSCode = " 170402 "
1717
18+ func testResetPasswordWithSmsCode( ) {
19+ expecting ( ) { exp in
20+ LCUser . resetPassword (
21+ withSmsCode: LCUserTestCase . testableSMSCode,
22+ newPassword: " 22223333 " ,
23+ phoneNumber: LCUserTestCase . testablePhoneNumber)
24+ { succeeded, error in
25+ XCTAssertTrue ( succeeded)
26+ XCTAssertNil ( error)
27+ exp. fulfill ( )
28+ }
29+ }
30+ }
31+
1832 func testSignUpAndLoginAndOther( ) {
1933
2034 let username = uuid
Original file line number Diff line number Diff line change @@ -380,11 +380,13 @@ FOUNDATION_EXPORT LeanCloudSocialPlatform const LeanCloudSocialPlatformWeiXin;
380380 * 使用验证码重置密码
381381 * @param code 6位验证码
382382 * @param password 新密码
383+ * @param phoneNumber 手机号码
383384 * @param block 回调结果
384385 */
385- +(void )resetPasswordWithSmsCode : (NSString *)code
386- newPassword : (NSString *)password
387- block : (LCBooleanResultBlock)block ;
386+ + (void )resetPasswordWithSmsCode : (NSString *)code
387+ newPassword : (NSString *)password
388+ phoneNumber : (NSString *)phoneNumber
389+ block : (LCBooleanResultBlock)block ;
388390
389391/* !
390392 * 用 sessionToken 来登录用户
Original file line number Diff line number Diff line change @@ -726,13 +726,18 @@ + (void)requestPasswordResetCodeForPhoneNumber:(NSString *)phoneNumber
726726 }];
727727}
728728
729- +(void )resetPasswordWithSmsCode : (NSString *)code
730- newPassword : (NSString *)password
731- block : (LCBooleanResultBlock)block {
729+ + (void )resetPasswordWithSmsCode : (NSString *)code
730+ newPassword : (NSString *)password
731+ phoneNumber : (NSString *)phoneNumber
732+ block : (LCBooleanResultBlock)block {
732733 NSParameterAssert (code);
733734
734735 NSString *path=[NSString stringWithFormat: @" resetPasswordBySmsCode/%@ " ,code];
735- [[LCPaasClient sharedInstance ] putObject: path withParameters: @{ @" password" : password } sessionToken: nil block: ^(id object, NSError *error) {
736+ [[LCPaasClient sharedInstance ] putObject: path
737+ withParameters: @{ @" password" : password,
738+ @" mobilePhoneNumber" : phoneNumber }
739+ sessionToken: nil
740+ block: ^(id object, NSError *error) {
736741 [LCUtils callBooleanResultBlock: block error: error];
737742 }];
738743}
Original file line number Diff line number Diff line change 1- #define SDK_VERSION @"13.9.3 "
1+ #define SDK_VERSION @"14.0.0 "
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = 'LeanCloudObjc'
3- s . version = '13.9.3 '
3+ s . version = '14.0.0 '
44 s . homepage = 'https://leancloud.cn/'
55 s . summary = 'LeanCloud Objective-C SDK'
66 s . authors = 'LeanCloud'
You can’t perform that action at this time.
0 commit comments