通过在动态通知中点击 WKInterfaceMap 打开 Apple 地图

Open Apple Maps by tapping on a WKInterfaceMap in a dynamic notification

我的手表应用收到包含位置信息的推送通知,我使用该信息来显示 WKInterfaceMap

但是,当我在通知动态界面中点击地图时,打开的是我的应用程序,而不是地图应用程序。

我发现 this forum post 说明:

There is no url to call at this time. The user tapping on a WKInterfaceMap object is the only way to launch the Maps app from yours.

有谁知道为什么这不适用于通知中的 WKInterfaceMap 个对象?

由于通知不是交互式的,因此不可能在动态通知中触发任何对象交互。点击通知区域的任意位置将始终启动您的手表应用程序。

这在 App Programming Guide 设计您的动态界面下有简要提及:

Tapping your notification interface launches the app, so notification interfaces should not contain interactive controls.