Gokulnath
Gokulnath

Reputation: 235

App is in foreground for more time

If an IOS app is in the foreground for more time, screen is not locked, even though the User is not doing any actions on the app. After 10 mts, what will be the app state?

Should the app request and respond for every 10 minutes to determine whether the app will be able to send the request for every 10 minutes?

Upvotes: 1

Views: 76

Answers (1)

Rok Jarc
Rok Jarc

Reputation: 18865

If you want your app to be able to use WiFi even after longer time of user inactivity you have to use this key in info.plist:

<key>UIRequiresPersistentWiFi</key>
<true/>

And if you need to keep the screen on as well you can disable idle timer:

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

Upvotes: 2

Related Questions