0
다 큰 후 지금은 다음과 같은 오류가 일하고있다 1.x에서 작동하지 않습니다 :이온 푸시는 더 이상
ionic.bundle.js:18463 OPTIONS https://push.ionic.io/api/v1/push net::ERR_NAME_NOT_RESOLVED
난 다음 사용하여 푸시를 보낼 것 캔트 :
// Encode your key
var auth = btoa(privateKey + ':');
// Build the request object
var req = {
method: 'POST',
url: 'https://push.ionic.io/api/v1/push',
headers: {
'Content-Type': 'application/json',
'X-Ionic-Application-Id': appId,
'Authorization': 'basic ' + auth
},
data: {
"tokens": devices,
"notification": {
"alert": message,
"ios":{
"priority": 10,
"badge": 1,
"payload": {"path": path}
}
}
}
};
// Make the API call
$http(req).success(function(resp){
// Handle success
console.log("Ionic Push: Push success!");
}).error(function(error){
// Handle error
console.log("Ionic Push: Push error...");
});
모든 것이 작동을 멈췄습니다. 이전에는 아름답게 작동했습니다. 당신의 도움이