我是 iOS 新手。我正在使用自定义身份验证。我检查了示例代码,我很困惑,当用户登录时,他们如何在用户面板中更新注册用户。
请告诉我应该如何使用他们的代码,我下载并运行了他们的示例代码,但它已经过时并且给出了很多错误。
我登录时的验证码 -
- (IBAction)signInid)sender
{
indicator.center = CGPointMake(160, 200);
[self.view addSubview:indicator];
[indicator startAnimating];
NSString* urlString = [NSString stringWithFormat"http:***********************",userName.text,passWord.text];
NSURL *add = [NSURL URLWithString:urlString];
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:add];
(void) [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self];
[QBRequest createSessionWithSuccessBlock:^(QBResponse *response, QBASession *session)
{
// session created
QBUUser *user = [QBUUser user];
//user.password = @"azhhdsf";
//user.login = @"dsfgsgf";
user.login = userName.text;
user.password = passWord.text;
// Registration/sign up of User
[QBRequest signUp:user successBlock:^(QBResponse *response, QBUUser *user)
{
// Sign up was successful
} errorBlock:^(QBResponse *response)
{
// Handle error here
NSLog(@"error while signing up with QB");
}];
}
errorBlock:^(QBResponse *response)
{
// handle errors
NSLog(@"%@", response.error);
}
];
}
获取线程错误-->
由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:'+[QBRequest createSessionWithSuccessBlock:errorBlock:]
我正在运行他们的登录示例代码 http://quickblox.com/developers/SimpleSample-users-ios#Adding_a_User_Base_to_your_application 但出现错误 -
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_MTBlockAlertView", referenced from:
objc-class-ref in SSUEditViewController.o
objc-class-ref in SSULoginViewController.o
objc-class-ref in SSUMainViewController.o
objc-class-ref in SSURegistrationViewController.o
ld: symbol(s) not found for architecture i386
linker command failed with exit code 1 (use -v to see invocation)
因为我是 iOS 新手,所以我可以解决这个错误..
您必须先阅读如何开始使用 QuickBlox 的指南
http://quickblox.com/developers/IOS#Oh.2C_please.2C_please_show_me_the_code
据我了解,您没有正确设置 QuickBlox 应用程序,这就是您收到此异常的原因
然后下载用户示例http://quickblox.com/developers/SimpleSample-users-ios ,玩它并阅读用户示例指南
关于ios - Quickblox - 如何在 QuickBlox API 中注册新用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26333451/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |