だから私は PhoneGap IOS と Parse.com プッシュ通知アプリをセットアップしようとしています。このプラグインhttps://github.com/mgcrea/cordova-push-notificationを使用して、デバイスを Apple に登録し、デバイス トークンを取得しています。次に、そのデータを Parse の Installation クラスに保存する必要があります。問題は、保存すると新しいインストール クラスが作成されることです。
var Installation = Parse.Object.extend("Installation");
var installation = new Installation();
installation.save({badge: status.pushBadge, deviceToken: status.deviceToken, deviceType: status.type, installationId: appID}, {
success: function(response){
alert("seccuees " + response);
},
error: function(error){
alert("error " + error.message);
}
});
また、残りのAPIへのajax呼び出しを使用してみましたが、うまくいきません..
$.ajax({
type: 'GET',
headers: {'X-Parse-Application-Id':'miid','X-Parse-Rest-API-Key':'myid'},
url: "https://api.parse.com/1/installations",
data: {"deviceType": "ios", "deviceToken": "01234567890123456789", "channels": [""]},
contentType: "application/json",
success: function(response){
alert("Success " + response);
},
error: function(error){
alert("Error " + error.message);
}
});