上传Installation数据失败。之前是好的,最近突然发现不行了。
总是返回错误:
上传DeviceToken失败, Invalid deviceProfile value. They must start with a letter, and a-zA-Z0-9_ are the only valid characters.
代码段:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
AVInstallation *currentInstallation = [AVInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (succeeded) {
NSLog(@"上传DeviceToken成功");
}
else{
NSLog(@"上传DeviceToken失败, %@", [error localizedDescription]);
}
}];
}
-
创建时间
15年10月11日
-
最后回复
15年10月14日
-
5
回复
-
987
浏览
-
2
用户