这个东西我自己测试了一下,非常爽,独立开发者可以用它做登陆注册,而且很安全,不会被AppStore拒绝。
保存密码到Safari:
[MUSharedWebCredentialsaveCredentialWithUsername:usernamepassword:passworddomain:@"meetup.com"completion:NULL];
从Safari请求用户已经保存的密码:
[MUSharedWebCredential requestCredentialWithSuccess:^(NSString*username,NSString*password,NSString*domain) {
[MULoginManager logInWithUsername:usernamepassword:password];
} failure:^(NSError*error) {
[self showError:error];
}];
删除一个密码:
[MUSharedWebCredential deleteCredentialWithUsername:username domain:@"meetup.com"completion:NULL];
获取一个密码:
NSString*randomPassword = [MUSharedWebCredential randomPassword];
网友评论