How to call an API while app is in background when app timeout period is exceeded

In my app timeout time on no user activity is set to 10 minutes.. after 10 minutes of idle time is over , user is logged out of app ... We have recently added a chat page in our app.. Now when app goes into background & app timeout period has exceeded since app went to idle mode even if app is in background we need to call an API to server to end active chat session from server end. So requirements in short are

1)Keep track of idle app time in foreground & even app moves into background.(should we use background processing modes to keep track of time in background mode as well?) 2)Whenever idle app timeout period is exceed(10 minutes) while app is in background hit an api call to end active chat session.(Its working fine in foreground)

I’m going to start by pointing you at my iOS Background Execution Limits post. Please read that through and then post back here with any follow-up questions you have.

Share and Enjoy

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

How to call an API while app is in background when app timeout period is exceeded
 
 
Q