Drakes
Drakes

Reputation: 23660

How to POLL an iOS app and check if it has resigned active?

When an iOS app has resigned active, it is still running. Timers still run, and HTTP operations continue.

How can I poll the app to determine if it has resigned active?

Please know that I'm not interested in observing UIApplicationWillResignActiveNotification, nor setting some flags in the appWillResignActive block. There are situations where code is run after the app has resigned active and will miss notifications, and the app delegate cannot be modified. Any help is appreciated.

Upvotes: 1

Views: 74

Answers (1)

Lukas Kukacka
Lukas Kukacka

Reputation: 7704

[UIApplication sharedApplication].applicationState? Or is it not good enough for your case / what you need?

Upvotes: 1

Related Questions