0
我正在通過Google雲消息接收遠程通知。一條消息彈出,一個徽章附加到應用程序項目,也聲音工作正常。現在我試圖訪問額外的數據,但有點掙扎。這就是消息的樣子:如何處理iOS遠程消息中的其他數據GCM
Notification received: [gcm.notification.shops: ["548","525"], gcm.message_id: 0:1472546619970126%1dfec10a1dfec10a, gcm.notification.vibrate: 1, aps: {
alert = {
body = "2 neue Gutscheine verf\U00fcgbar";
title = "Neue Gutscheine";
};
badge = 2;
"content-available" = 1;
sound = 1;
}]
我該如何訪問商店數組?這不起作用:
var shops :[String] = userInfo["shops"] as! [String]
我想處理它在didReceiveRemoteNotification()函數。