我正在通过 Google Cloud Messages 接收远程通知。一条消息弹出,一个徽章附加到应用程序项上,声音也很好。现在我正在尝试访问其他数据,但有点挣扎。这就是消息的样子:
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() 函数中处理它。