我正在尝试向watchapp上的动态通知屏幕添加Second Button
。
但模拟器只显示第一个按钮。
{
"aps": {
"alert": "Test message",
"title": "Optional title",
"category": "myCategory"
},
"WatchKit Simulator Actions": [
{
"title": "First Button",
"identifier": "firstButtonAction"
}
{
"identifier" : "Second Button",
"title" : "secondButtonAction"
},
]
}
答案 0 :(得分:2)
对于第二项,您将标题标记为标识符,反之亦然。此外,您在“WatchKit Simulator Actions”数组中缺少两个对象之间的逗号。请参阅json.org
处的语法"WatchKit Simulator Actions": [
{
"title": "First Button",
"identifier": "firstButtonAction"
},
{
"title": "Second Button",
"identifier": "secondButtonAction"
},
]
}