【发布时间】:2026-02-15 19:55:01
【问题描述】:
{
"aps": {
"alert" : {
"title": "Daily Sales",
"body": "Bed"
},
"badge" : 1,
"mutable-content": 1
},
"my-attachment" : "https://secure.img1.wfrcdn.com/lf/maxsquare/hash/36984/27677880/1/Wimbush-Panel-Bed-DBHC7470.jpg"
}
这是一个远程推送通知负载。当设备收到这个并由func didReceive(UNNotificationRequest, withContentHandler: (UNNotificationContent) -> Void)接收时,“我的附件”会直接进入content.attachments吗?如果我在 json 文件中添加更多自定义数据?会发生什么?
【问题讨论】:
-
它不会直接进入附件,它会在通知内容的用户信息中。见:*.com/questions/39399154/…
标签: ios ios10 usernotifications