简体   繁体   English

如何从iOS应用显示Watchkit概览

[英]How display watchkit glance from iOS app

I have an iOS app with a corresponding WatchKit app. 我有一个带有相应WatchWatch应用程序的iOS应用程序。 When I press a button in the iOS app, I want to launch the watch app glance screen and show a countdown timer. 当我在iOS应用中按下按钮时,我想启动手表应用的扫视屏幕并显示一个倒数计时器。

Which method or techniques should I use. 我应该使用哪种方法或技术。 I have already setup the glance screen and glance schemes, but have no idea how to launch the glance. 我已经设置了扫视屏幕和扫视方案,但不知道如何启动扫视。

You can't programmatically launch your glance (or watch app) from your iOS app. 您无法以编程方式从iOS应用启动扫视(或观看应用)。

The best you can do is send the application context to the watch, so that the glance or watch app would already have details about the countdown, if either were opened by the user. 最好的办法是将应用程序上下文发送到手表,以便一目了然或手表应用程序已经具有有关倒计时的详细信息(如果其中任何一个由用户打开)。

You can find out more about this in WCSession Class Reference . 您可以在WCSession类参考中找到有关此内容的更多信息。

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

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