Search code examples
iosbackground-process

IOS limitations when running on background


I searched informations about possibilities when running an iOS app on background, but I didn't found same on different sites.

My application has to read the battery level (with step of 1%) and the time, but I don't know if I can read that when running on background.

Please if someone is sure about it or know a site to read these infos, it will be very nice.

EDIT : I've one more question, can I just open my app (to perform more actions) when the notification center return a battery state under 5% for example ?


Solution

  • No, you can't.

    It's not possible to let your app running on background, it's iOS system's limitations.

    In iOS 7.0 and later, you have opportunity to do some pre-fetch stuff even your app is not running, through the method like application:performFetchWithCompletionHandler:, but you should tell the device by posting remote notification from your server.