Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Call the incoming push completion handler when the call is reported to CallKit #142

Merged

Conversation

bobiechen-twilio
Copy link
Contributor

the updates is to fix an issue where CallKit calls are not properly shown to the users when the app is in the background or terminated. The issue happens when reporting the call to CallKit and calling the incoming-push completion handler at the same time (when the app is not in the foreground). For some reason the CallKit reporting method gets stuck and won't fire the completion block in this scenario. The fix relieves the problem by only calling the incoming-push-completion when the call is reported.

Save the completion handler of the pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler: method and call when the call is properly reported to CallKit and handled.

Copy link
Contributor

@piyushtank piyushtank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Minor comment to move the incomingPushHandled last thing to do in the calling method would be nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants