求救啊....前段时间还没有这个问题的
用AVInstallation添加了一个channels, 然后用saveInBackgroundWithBlock保存, 回调的succeeded是YES, 但是leancloud存储_Installation表是没有变化的, 请问是什么原因, 下面我贴出一些代码和log:
我保存的值是in, 用户名是test9
代码:
[BZChatKitManager invokeThisMethodAfterLoginSuccessWithClientId:userName success:^{
[USER_DEFAULT setBool:NO forKey:NEW_LOGIN];
NSLog(@"AVOSCloud 登陆成功");
AVInstallation * installation = [AVInstallation currentInstallation];
NSLog(@"installation.channels1 == %@",installation.channels);
[installation addUniqueObject:language forKey:@"channels"];
NSLog(@"installation.channels2 == %@",installation.channels);
[installation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (succeeded) {
NSLog(@"用户信息保存成功");
NSLog(@"installation.channels3 == %@",installation.channels);
}else{
NSLog(@"error == %@",error);
}
}];
} failed:^(NSError *error) {
NSLog(@"AVOSCloud 登陆失败%@",error);
}];
打印的log:
AVOSCloud 登陆成功
installation.channels1 == (
test9
)
installation.channels2 == (
test9,
in
)
[DEBUG] __59-[AVPaasClient performRequest:saveResult:block:retryTimes:]_block_invoke [Line 577]
------ BEGIN LeanCloud REST Response ------
path: /1.1/batch/save
cost: 0.098s
response: {
IKgtyAQypmCuneo6h0wsjBaCiX2NKKac = {
createdAt = "2016-12-01T09:37:00.590Z";
objectId = IKgtyAQypmCuneo6h0wsjBaCiX2NKKac;
updatedAt = "2016-12-01T09:44:35.350Z";
};
}
------ END --------------------------------
[INFO] -[AVIMWebSocketWrapper webSocket:didReceiveMessage:] [Line 764]
------ BEGIN LeanCloud IM In Command ------
content: <AVIMGenericCommand 0x1701da400>: {
cmd: report
op: uploaded
appId: "EcchTDMqE3DJovrA0GDcanCV-gzGzoHsz"
peerId: "test9"
reportMessage {
}
}
------ END --------------------------------
[INFO] -[AVObject saveWithOption:eventually:verifyBefore:error:] [Line 700]
Object not changed, ignore save request.
用户信息保存成功
installation.channels3 == (
test9,
in
)
请问明明改变了 为什么还会出现
Object not changed, ignore save request.
这句信息呢
后台的存储_Installation没有保存in 只是登录的时候SDK自己帮保存了一个用户名, 试过卸载app重新安装也不行
-
创建时间
16年12月1日
-
最后回复
16年12月7日
-
19
回复
-
1.9K
浏览
-
3
用户
-
5
链接