根据我的研究,似乎iPhone的通知将在Watch上自动支持,无需任何额外的开发或WatchKit实现.
Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However,apps can customize the notification interface and include custom graphics,content,and branding.
它是否正确?
如果是这样:
1. Watch上的通知是否具有与iPhone应用程序配置的操作按钮?
2.有什么方法可以在模拟器上测试它以确保它按预期工作吗?
如果不:
3.有没有办法只支持通知而不创建Watch应用程序?
这是我到目前为止发现的更相关的问题,但它并不是我真正想要的. How to trigger notifications using WatchKit
解决方法
I would like to support my iPhone’s app Local Notifications in the Apple Watch from the very first moment the Watch is released
您的iOS应用程序的通知将在Apple Watch的第一天起作用.
Will notifications on the Watch have action buttons just like
configured for the iPhone app?
如果您的iOS应用已经支持可操作的通知,那么它们将与Apple Watch一起使用.
Is there any way I can test that on the simulator to be sure it works
as expected?
实际上很好的问题是,您无法测试当前iOS应用程序在模拟器上工作的通知,但您可以从WatchKit测试自定义通知界面.
您应该为此提交功能请求.
Is there any way to support only notifications without creating a Watch app?
不,您需要提供示例Notification JSON有效负载作为WatchKit Bundle的一部分,这需要提交Apple Watch应用程序.