Die aps
Struktur übergeben wird als verschachteltes Objekt auf dem Objekt userInfo
, das in der AppDelegate-Methode didReceiveRemoteNotification
verfügbar ist. Sie können es mit so etwas wie dies in Swift verwenden:
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
if let notification = userInfo["aps"] as? NSDictionary,
let alert = notification["alert"] as? String {
// do something with 'alert'
(Code-Schnipsel aus http://www.intertech.com/Blog/push-notifications-tutorial-for-ios-9/)
Zur besseren Aufklärung über Anmeldung finden Sie unter [Dokumentation] (https://developer.apple.com/library/ios /documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html) – Gokul
aber was werden die Payload-Schemata sein, wenn sie von kinvey gesendet werden – Halid
Sorry Gorel, ich bin mir nicht bewusst ** kinvey **. Wenn ich etwas gefunden habe, werde ich dich wissen lassen. – Gokul