问题描述
首先集成sdk,添加运行库完了后build successed.之后在APPDelegate里添加代码:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { EMOptions *options = [EMOptions optionsWithAppkey:@"top1#toponeusecar"]; [[EMClient sharedClient] initializeSDKWithOptions:options]; EMError *registError = [[EMClient sharedClient] registerWithUsername:@"zhu" password:@"123"]; if (registError == nil) { NSLog(@"注册成功"); EMError *loginError = [[EMClient sharedClient] loginWithUsername:@"zhu" password:@"123"]; if (loginError == nil) { NSLog(@"登录成功"); [[EMClient sharedClient].options setIsAutoLogin:YES]; } else { NSLog(@"登录失败"); } } else { NSLog(@"注册失败"); } return YES;}再运行就报如下错误:
解决方案
找到了,sdk3.0文档里面没有说要加Libiconv库 ,加上就好了