だから私はタイマーを宣言しました:
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 clearing the 以前にキャッシュされた値」で失敗します。
どうすればこれを解決できますか?