Watch-kit:将 "Notifications Scene" 添加到现有 watchkit 应用 ios

Watch-kit : adding "Notifications Scene" to existing watchkit app ios

我搜索过 SO 和其他 开发者论坛,我没有得到任何满意的答案。

不,您不必创建另一个目标来处理通知。您需要做的就是将 Notification Interface Controller 对象添加到您的 Interface.stroyboard 文件以及您需要创建的 .apns 文件,如果您有 select在项目创建过程中编辑了选项。

如果要实现动态通知场景,请从对象库中添加一个 Notification Interface Controller 对象并 select 选项 Has Dynamic Interfaces。这会自动将另一个场景添加到您的故事板上。

勾选Apple Documentation for details and Tutorial to set up remote notification in Watch App. Though the tutorial doesn't add the notification scene separately but you will get the idea https://www.natashatherobot.com/watchkit-actionable-notifications