When our iOS app authenticates with the server, a background thread is initialized using the
beginBackgroundTaskWithExpirationHandler: interface.
The intention is that when the user backgrounds our application while in an authenticated state, the
background task will end the authentication session with the server after 3 minutes of not returning to the foreground.
This design has been working well for us for years. Until the iPhoneX arrived and a small handful of clients started to
complain that their session was being dropped after shortly sending our app to the background and returning to the app within a
short time. Which means that our expirationHandler is being called after an unexpectedly short amount of time (usually 15 seconds).
when entering the background, our task calls
[UIApplication sharedApplication].backgroundTimeRemaining
which we typically expect to return something like 170.
on the iPhoneX it returns 1.797693134862316e+308
Why is the expirationHandler being called after 15 seconds on iPhoneX hardware?
How can I allow for more time in the background before the expirationHandler is called?
Thanks,
|K<