且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HKWorkoutSession并未将应用程序放在Apple Watch的前面

更新时间:2023-12-03 17:40:58

我们也看到了这一点,目前,我们已经确保已配置打开上一个活动".

We're seeing that too, for the moment we've made sure 'opens last activity' is configured.

当用户界面处于活动状态时,我们启动dispatch_timer,以每隔1秒的间隔请求和处理数据.

When the UI is active we start a dispatch_timer to request and process data in 1 second intervals.

但是请确保使用NSUserProcessInfo方法进行任何重要的处理,并在不再活动时暂停一下dispatch_timers.否则,您将崩溃.

Make sure you do any significant processing using the NSUserProcessInfo method though and pause the dispatch_timers whenever you are no longer active. You'll get crashes otherwise.