core motion - In IOS 11, DeviceMotion in background stopped working -


my app reports , records location, altitude, rotation , accelerometer data (devicemotion) while in background. works fine on ios 10.3.3. on ios 11, no longer have access motion data while device locked. altitude data , location data still streaming console, though.

has changed in ios 11 prevents me accessing motion data or doing trying access in way apple blocks operationqueue.main

here how i'm starting motion updates. if phone unlocked, works fine. if locking phone, no more updates.:

let motionmanager = self.motionmanager      if motionmanager.isdevicemotionavailable {         motionupdateinterval = 0.15         motionmanager.devicemotionupdateinterval = motionupdateinterval          motionmanager.startdevicemotionupdates(using: .xarbitraryzvertical, to: operationqueue.main) {devicemotion, error in             guard let devicemotion = devicemotion else { return } 

i can't find motion background modes changing seems there must way otherwise runkeeper, strava break. can me working again before ios11 launch?

thanks!


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -