【发布时间】:2014-08-25 21:00:25
【问题描述】:
我的问题似乎与这个问题几乎相同,但从未解决:
https://www.parse.com/questions/installation-not-created
当我从 Parse 数据浏览器中删除所有安装时,它开始了(坏主意,我现在知道了)。现在的问题是它不会从我的(真实)测试设备之一保存任何新安装,大概是因为这个令人困惑的错误:
Error: badge must be a non-negative integer: -3 (Code: 111, Version: 1.2.20)
当我尚未对徽章编号执行任何操作时,会在全新安装时发生这种情况。更复杂的是,Parse 将保存来自其他(真实)设备和模拟器的安装。作为参考,这是我尝试在 AppDelegate.m 中保存安装的方式:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Store the deviceToken in the current installation and save it to Parse.
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackground];
}
有什么想法吗?
【问题讨论】:
标签: ios objective-c parse-platform