Parse正在推动IOS的推进。我连续发送10条消息,间隔3秒,适用于Android,但解析为IOS随机丢弃消息。消息通过clound函数发送,适用于Android。您可以在图片中看到四个连续失败,然后连续3个成功,然后失败并成功。我的云功能非常简单,它首先搜索安装,然后检查它是否是iOS,做了一点格式化并发送它。
Function pushToInstallations(results, messageObject, response) {
var pushedCount = 0;
var failedCount = 0;
for (i in results) {
Parse.Cloud.useMasterKey();
var installation = new Parse.Installation(results[i]);
console.log("processing installation " + i);
// console.log(installation);
var deviceType = installation.get("deviceType");
console.log("installation deviceType " + deviceType);
var payload;
if (deviceType == "android") {
payload = createAndroidPayload(messageObject, installation);
} else {
payload = createIosPayload(messageObject, installation);
}
var query = new Parse.Query(Parse.Installation);
console.log("installation id" + installation.get("installationId"))
query.equalTo("installationId", installation.get("installationId"));
Parse.Push.send({
where: query,
data: payload
}).then(function() {
pushedCount++;
.....
}, function(error) {
failedCount++;
.....
});
}
}
答案 0 :(得分:0)
您必须知道推送通知不是100%保证。苹果公司明确表示了这一点。