所以我声明了一个计时器:
self.timer = Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(self.updateWatch), userInfo: data!, repeats: true)
(数据类型为 CMMotionActivity)
然后我在 updateWatch() 函数中获取 userInfo:
let data = timer.userInfo as! CMMotionActivity
但是当尝试它时,程序失败并显示“[Client] #Warning Sending an un-cached message 'kCLConnectionMessageMotionActivityUpdate' without first clear the previous cached value”
我该如何解决这个问题?