How to refresh my iOS-App regularly?

Hi,

I tried to figure out how I can get my iOS-App to refresh regularly if it is in the background. I thought about WhatsApp. Even if it is closed it updates itself in the background and checks for new messages. But how does it do this?

I would like to observe the battery charging level. But my app should also observe it when I switched the screen off (locked my iPhone). I don't know how to do this. A Timer will not work, it is not available if the app is in the background. To clarify: I know how to read the battery level but I don't know how to observing the battery level when the app is in the background.

I tried to learn something about the Background App Refresh function but I had no success.

Have a read of iOS Background Execution Limits. It explains the basics.

I would like to observe the battery charging level.

AFAIK there’s no mechanism to resume (or relaunch) your app in the background when the battery charging level changes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to refresh my iOS-App regularly?
 
 
Q