NSData *deviceToken = [[NSUserDefaults standardUserDefaults]valueForKey:@"cloud_device_token"];
if (deviceToken) {
AVInstallation *currentInstallation = [AVInstallation currentInstallation];
if (currentInstallation) {
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation setObject:user forKey:@"owner"];
[currentInstallation saveInBackground];
}
上面是我们的代码, 很简单的, 用户登录成功后, 就注册设备ID(ios)
以前一直生效的, 今天一直收不到推送(后台notification表有推送记录),
然后我们就找出这个用户, 把之前关联的token记录从installation表里面删除了
然后却发现再登录, 断点也跟到了saveInBackground, 但后台就是没有数据. 什么原因?
-
创建时间
15年6月17日
-
最后回复
15年11月18日
-
3
回复
-
1.8K
浏览
-
3
用户
-
1
赞
-
1
链接