question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature-Request, iOS] Add completion for fulfilling action of 'performEndCallAction' delegate

See original GitHub issue

Hey guys! Thank you all for the great project. It’s absolutely must-have for calling apps based on react-native!

In our project we use the event ‘endCall’ to let know a server that incoming call was declined on the client side. The problem is when user declines an incoming call by system notification at the top of screen on iOS, while having the closed app, OS soon pauses all JS execution until a user opens the application.

I has been debugging the issue and finally figured out that implementation of performEndCallAction https://github.com/react-native-webrtc/react-native-callkeep/blob/2a4b0c0dc134021bedd85f57a2cc7dc68a717430/ios/RNCallKeep/RNCallKeep.m#L1051-L1059 fulfills the end call action right after emitting the event to JS-runtime. For example, if fulfillment will be delayed for 5 seconds then RN-side would be able to process properly notifying the server about declining call in my case.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
Hesowcharovcommented, Jul 6, 2022

If someone else is looking for alternative approach you can get inspiration from my gist - https://gist.github.com/Hesowcharov/1e3e0dcdc6806fb0b234f01d7d9233a6

1reaction
Hesowcharovcommented, Jul 7, 2022

up: I’ve implemented with the approach above and it seems working flawlessly! When the iOS app receives voip-push and boots the application, while a user immediately declines the incoming call with the CallKit UI notification, RN app manages to setup and send a request to the server and only then fulfill the end call action (the notification hangs on a few seconds and wait to be dismissed on fulfillment).

Read more comments on GitHub >

github_iconTop Results From Across the Web

CallKit CXCallAction Transactions … | Apple Developer Forums
A transaction with a CXEndCallAction is called. CXEndCallAction completion handler is called. performEndCallAction delegate method is triggered.
Read more >
Twilio incoming call is not working in iOS | Edureka Community
Report the incoming call to * CallKit and fulfill the completion before ... UUID to perform end-call action with"); } [action fulfill]; ...
Read more >
CallKit "call failed screen" appears - ios - Stack Overflow
To end the call, use CXEndCallAction and add the CXTransaction objects. ... the call */ NSLog(@"performEndCallAction"); [action fulfill]; }.
Read more >
CallKit Tutorial for iOS | Kodeco, the new raywenderlich.com
A unique UUID identifies each action, which can fail or fulfill. ... Go back to Xcode, return to ProviderDelegate.swift, and add the ...
Read more >
CallKit in Xamarin.iOS - Microsoft Learn
The new CallKit API in iOS 10 provides a way for VOIP apps to ... (ActiveCallbackDelegate completionHandler) { // Simulate the call starting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found