WatchOS suspends process execution when faces down

I am writing an app that records accelerometer data in the background. When we call sensor.accelerometerData(from:to:), the for loop when iterating CMSensorDataList suspends/pauses as the watch screen turns off and resumes when app comes to foreground. Is there a way we can keep the processing on until it completes? I used Location Updates capability in Background Modes as a hack but it will make my app rejected from App store just to acquire capability for background execution.

Please note that our data is comprised of larger sets, say hours. We retrieve data in batches of 30 minutes each but this also does not complete.

Answered by Engineer in 807057022

Any background capability you might want to employ, similar to Location Updates (Audio, Workouts, Extended Runtime), can only be used for their intended purposes, and not to have apps to execute arbitrary functions in the background. As there is no specific background capability for accelerometer data, any background capability you use for this without implementing a related feature will carry a risk of your app being rejected.

Ref: App Review Guidelines

2.5.4 Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.


Argun Tekant /  DTS Engineer / Core Technologies

Accepted Answer

Any background capability you might want to employ, similar to Location Updates (Audio, Workouts, Extended Runtime), can only be used for their intended purposes, and not to have apps to execute arbitrary functions in the background. As there is no specific background capability for accelerometer data, any background capability you use for this without implementing a related feature will carry a risk of your app being rejected.

Ref: App Review Guidelines

2.5.4 Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.


Argun Tekant /  DTS Engineer / Core Technologies

WatchOS suspends process execution when faces down
 
 
Q