ios - 默认情况下,iPhone 的应用程序通知是否会在 Apple Watch 上触发,甚至无需创建实际的 Watch 应用程序?

标签 ios apple-push-notifications watchkit apple-watch

我想从 Apple Watch 发布的第一刻起就在 Apple Watch 中支持我的 iPhone 应用程序本地通知,但我还不打算构建 Watch 应用程序。 根据我的研究,Apple Watch 似乎会自动支持 iPhone 的通知,无需任何额外的开发或 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?

不,您需要提供示例通知 JSON 负载作为 WatchKit bundle 的一部分,这需要提交 Apple Watch 应用。

关于ios - 默认情况下,iPhone 的应用程序通知是否会在 Apple Watch 上触发,甚至无需创建实际的 Watch 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28265134/

相关文章:

ios - 如何更改Apple Research Kit中预定义按钮的颜色

ios - 第二次使用一个方法给我一个错误(IOS)

ios - 通过 APNS 在有效负载中发送的数据

ios - 为 watchOS 2.0 实现核心数据

ios - 在 watchOS 2.0 中使用核心数据

ios - 用于 youtube 自动播放、屏幕超时和摄像头的 html5 ios native 桥

ios - DateFormatter 在设备上产生意外结果

ios - watchKit 无法在模拟器上运行

Heroku Rails App 上的 iOS 推送通知——如何提供 PEM 文件

swift - 多次发送多个通知 (Swift)