我想知道是否可以通过Parse.com API从一个IOS应用程序向不同的IOS应用程序发送推送通知。我已经可以在同一个应用程序中发送推送通知,但我想从一个应用程序发送到我的不同应用程序。
答案 0 :(得分:0)
从技术上讲,您可以使用Cloud Code中的REST API,使用不同的标头回调Parse。
Parse.Cloud.httpRequest({
method: "POST",
headers: {
"X-Parse-Application-Id": YOUR_APP_ID,
"X-Parse-REST-API-Key": REST_API_KEY,
"Content-Type": "application/json"
},
body: {
"data": {
"alert": "Yo"
}
},
url: "https://api.parse.com/1/push"
}).then(function() {
console.log("Successful push");
}, function(error) {
console.log(error);
});
取自官方论坛:Click here