【发布时间】:2015-05-15 08:37:21
【问题描述】:
我已经测试了模拟的 Apple Watch 推送通知,它工作正常...
但是,当我尝试将其发送到实际的 Apple Watch 时,按钮没有出现……为什么会这样?
当我以 json 格式而不是文本发送推送通知时,它不会振动或发出哔哔声...
{
"aps": {
"alert": {
"body": "Great!\nNew input",
"title": "Optional title"
},
"category": "sCategory"
},
"WatchKit Simulator Actions": [
{
"title": "Details",
"identifier": "sDetailsButtonAction"
}
],
"customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
}
【问题讨论】:
标签: ios push-notification apple-watch