Accessing sensors in background while app is closed

Hello everyone, my name is Jens and I am currently doing my PhD in the field of digital health care.

In the context of mobile crowdsensing, I am currently developing a library that will enable scientific studies to monitor sensor data from subjects' devices. For Android devices I have already implemented a so-called ForegroundService, which runs while the app is closed and also restarts itself after a reboot.

For iOS, however, I have not found a way to implement the same. Is there a way to implement such a library? And if so, with what limitations?

Not possible. Everything goes to sleep after a certain time unless it is an Apple system service which runs on a different set of rules, GPS region monitoring related, VOIP related, background audio etc.

Accessing sensors in background while app is closed
 
 
Q