파스 클라우드 코드 (Parse Cloud Code)에서 푸시 페이로드로 지오 포인트를 보내려고 애 쓰고 있습니다. 코드에 명시된 바와 같이, 내가 추가 한 행을 주석으로 처리하면 'latitude':location.latitude
푸시 알림이 도착합니다.페이로드 브레이크 알림에서 '위치'를 사용하는 이유는 무엇입니까?
그러나 줄을 입력하면 success
이 호출되지만 구문 분석 푸시 제어판에 푸시가 0 명의 수신자로 표시됩니다. 물론 그것은 결코 다른 끝에 도착하지 않습니다.
Location.latitude가 null이 아니며 보통 10 진수입니다. 위치는 Geopoint입니다. 즉 "location":{"__type":"GeoPoint","latitude":0.40281958847904,"longitude":-0.337979459707093}
Help?
var pushData = {
'aps': {
'alert':'Here lies treasure ' + placeName,
'badge':'Increment',
'priority':10,
'sound':"Ting.caf",
'content-available':1
},
'latitude': location.latitude, // if I comment this line out everything works fine
'senderName':senderName,
'sender': senderID,
'request': request.id
};
Parse.Push.send({
channels: [recipient],
data: pushData
}, {
success: function() {
console.log("Pushed for " + recipient);
},
error: function(error) {
console.log("Error " + JSON.stringify(error) + " sending push for " + recipient);
}
});
다른 하나의 정보 비트로,이 키를 설정하면 구문 분석 푸시 콘솔의 "대상"아래에있는 채널 목록에서 '사과'가 제거됩니다. iOS 용으로