简体   繁体   English

如何将用户从Apple Watch Notification转移到Apple Watch App?

[英]How to transfer user from Apple Watch Notification to Apple Watch App?

When a Push Notification is displayed on the Apple Watch, the only possibility to open the Apple Watch App is to tap the App icon in the upper left corner. 当Apple Watch上显示推式通知时,打开Apple Watch App的唯一可能性是点击左上角的App图标。

Now, as I´m reviewing our tracking data, no user seems to know this. 现在,当我查看跟踪数据时,似乎没有用户知道这一点。

How can I install another tap area in the Notification View which transfers the user in the Watch App? 如何在通知视图中安装另一个点击区域,以在Watch App中转移用户?

The first thing to understand is that notifications aren't specific to either the iPhone or the Apple Watch. 首先要了解的是,通知并非特定于iPhone或Apple Watch。 They're the same old notifications we've been dealing with for years, and nothing has changed. 它们是我们多年来处理的相同的旧通知,并且没有任何变化。 That means that there's no such thing as an "Apple Watch-specific notification" or an "iPhone-only notification." 这意味着没有“ Apple Watch特定的通知”或“仅iPhone的通知”之类的东西。 iOS decides where to route a notification based on its own heuristics. iOS会根据自己的启发式方法决定将通知路由到何处。 There is no way to programmatically control which device receives an alert. 无法以编程方式控制哪个设备收到警报。

That said, stk is correct that you will have to add actions to a category that you set for your notification. 就是说,stk是正确的,您必须将操作添加到为通知设置的类别中。 The Notification Essentials section of the Apple Watch Programming Guide has some sample code. 《 Apple Watch编程指南》的“ Notification Essentials”部分包含一些示例代码。

Because there is no such thing as an iPhone- or Watch-specific notification, you're correct that you will see these actions on both devices. 因为没有诸如iPhone或Watch特定的通知之类的东西,所以您在两个设备上都可以看到这些操作是正确的。 So, you'll have to do something meaningful on both platforms. 因此,您必须在两个平台上都要做有意义的事情。 This makes sense, because iOS decides where to send the notification, so it should be handled appropriately wherever it's sent. 这是有道理的,因为iOS决定了将通知发送到的位置,因此无论将其发送到何处都应该对其进行适当的处​​理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM