2016-08-19 4 views
0

iOS Push-Benachrichtigung über AWS SNS. Payload wird in der Benachrichtigungskonsole von iOS-Geräten anstelle von Nachrichten angezeigt.iOS Push-Benachrichtigung durch AWS SNS

ex:

{ 
"default": "Sample message", 
"APNS": { 
"aps": { 
"alert": { 
"body": "You have new message", 
"title": "Sample message" 
} 
} 
} 
} 
+0

also was ist Ihre Frage? –

Antwort

0

Das Problem ist, dass Sie aps innen APNS gehalten.

Gemäß der Apple-Dokumentation sollte die Nutzlast so sein,

{ 
    "aps" : { 
     "alert" : { 
      "title" : "Game Request", 
      "body" : "Bob wants to play poker", 
      "action-loc-key" : "PLAY" 
     }, 
     "badge" : 5 
    }, 
    "acme1" : "bar", 
    "acme2" : [ "bang", "whiz" ] 
} 

Hinweis: „aps“ in den Tasten direkt zur Verfügung stehen soll, können Sie es in anderen Werten nicht einschließen sollten.

Dokumentation: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW1),