我這樣做,因爲這功能對每一個應用程序啓動執行在「didRegisterForRemoteNotification」API請求/秒 - 推送通知
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
NSLog(@"Device token updated! %d", succeeded);
}];
以下 - 我的問題是這是否計入到REQ/s的算嗎?
如果這樣能夠節省我的REQ/s的數 - 而且這還是可靠:
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
if (![[currentInstallation valueForKey:@"deviceToken"] isEqualToString:
[[[[NSString stringWithFormat:@"%@", deviceToken]
stringByReplacingOccurrencesOfString:@" " withString:@""]
stringByReplacingOccurrencesOfString:@"<" withString:@""]
stringByReplacingOccurrencesOfString:@">" withString:@""]]) {
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
NSLog(@"Device token updated! %d", succeeded);
}];
} else {
NSLog(@"DEVICE TOKEN UNCHANGED");
}
我想使用parse.com爲大規模應用的推送服務(300-700k活躍uniq設備) - 我沒有使用parse-core部分 - 所以我試圖評估30/s自由模型是否符合我的要求。
會發生什麼 - 如果達到REQ限制 - 在didRegisterForRemoteNotificationsWithDeviceToken
問候內