注册

iOS SDK 2.X 升级 3.1.0,数据库升级迁移失败

我在 appdelegate didFinishLaunching 调用的,在注册 appkey 之前之后调用
[EMClient sharedClient] dataMigrationTo3]  都失败。有可能是什么原因呢?大神给分析下吧!感谢!
代码如下:
    if([[i][b][EMClient sharedClient] dataMigrationTo3][/b][/i])
{
MLog(@"EaseMob db update success ~~");
}
EMOptions *options = [EMOptions optionsWithAppkey:EMAppkey];
[[EMClient sharedClient] initializeSDKWithOptions:options];
[[EMClient sharedClient] addDelegate:self delegateQueue:nil];//登陆相关的回调
[[EMClient sharedClient].groupManager addDelegate:self delegateQueue:nil];//群组回调
[[EMClient sharedClient].chatManager addDelegate:self delegateQueue:nil];//消息回调
已邀请:
解决了,写在数据库查询操作之前就可以迁移数据库了。。。。

要回复问题请先登录注册