Accelerometer data acquisition in the background

I am developing an iOS 4 + application that can transfer accelerometry data collected on an iPhone to a server. The application must collect data even when the application enters the background (I want to know the movements of the faces).

After several studies on the Internet, I found out that the application was killed 10 minutes after closing, and it cannot be implemented in the same way as on Android (using services).

Only some tasks can be performed in the background, for example, an audio player, VOIP or geolocation. I read somewhere on the Internet that we can use workarounds to run the application in the background. It uses an audio player that reproduces sound without sound. However, this workaround did not seem to be made by Apple.

Do you see any solution to my problem?

+6
source share
2 answers

If you register an application to listen to the location and use CoreMotion, you can get accelerometer data in the background.

This is a duplicate: How does Nike + GPS on iPhone get accelerometer updates in the background?

+8
source

The accelerometer is not available for background streams. Read this MacWorld article on what is possible and what is not.

-2
source

Source: https://habr.com/ru/post/920865/


All Articles