I’m implementing VoIP calls on iOS using the Amazon Chime SDK with PushKit + CallKit.
The flow works fine when the user is logged in and the session is valid.
Scenario:
User is logged in.
App is in a terminated state and iPhone is locked.
A VoIP push notification arrives (incoming call).
User should be able to answer the call directly.
Problem: Joining the call requires a valid session token. But if the session has already expired, the app cannot fetch the meeting info/token and the user can’t join the call.
Question:
What is the industry standard approach to handle this?
Do apps like Slack/Teams maintain a special long-lived token for calls?
Or should I implement a refresh token flow (wake app in background → refresh → join call)?
Current Code (simplified):
// Called when VoIP push arrives
func pushRegistry(_ registry: PKPushRegistry,
didReceiveIncomingPushWith payload: PKPushPayload,
for type: PKPushType,
completion: @escaping () -> Void) {
let callData = payload.dictionaryPayload
// Validate token
if isSessionExpired() {
// ❌ Problem: can't fetch meeting info
// What should be the right approach here?
return
}
// Fetch meeting details from backend
fetchMeetingInfo(token: sessionToken) { meetingInfo in
startCall(meetingInfo)
}
}
How should this be handled if the session has expired? Any best practices or references for apps using Chime SDK (or similar, like Slack/Teams) would be very helpful.