-
Notifications
You must be signed in to change notification settings - Fork 459
[iOS 13] callKit displayed from AppDelegate.m before incoming call listeners #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ahmadworks. |
I don't think this should be the normal behaviour even after iOS 13, I can report to call but the call should appear on screen only after the app knows how to deal with the call. in current case what should happen if user quickly tapped answer before the app knows how it should handle the answer and reject. |
@ahmadworks this is needed for ios13 so we need to think collectively about how to work around that issue. I think from my perspective we need the native side to know that the JS bridge isn't up yet and so wait until it is and then emit the event of "yes someone accepted the call" |
@danjenkins also to emit UUID data of active CallKit call (for example, to update the incoming call display). Because RN doesn't know the current UUID call after the bridge is up. didDisplayIncomingCall not called (error "Sending 'RNCallKeepDidDisplayIncomingCall' with no listeners registered.) |
@Prussich you have to listen to the events at the very beginning of the loading of your app (eg. in the |
This comment has been minimized.
This comment has been minimized.
@bmp123 please create a new issue for that :) |
@manuquentin
RN bridge still not live. And there are no CallKeep listeners yet. But, RNCallKeepDidDisplayIncomingCall was not called and RNCallKeep doesn't know which uuid was used in reportNewIncomingCall:uuid in native part. Please correct me if everything is wrong and you can know in the RN part which UUID of the incoming call was used before in the native part of the application. |
@manuquentin I also try to listen to the events at the very beginning of the loading of my app: At the top of index.ios.js:
and I don't see any event records in log file about "onIncomingCallDisplayed". In the native part, sending the onIncomingCallDisplayed event fires earlier than there is a subscription to the event in JS. Any ideas how to fix this? |
@Prussich there is a timeout to work around this issue here. Here the event triggered too soon event with this workaround ? |
Good idea! But it work around for the outgoing call (RNCallKeepDidReceiveStartCallAction event). |
Hello, please do share if anyone got a solution for this. Thanks! |
Would it not be possible create a method |
For anyone interested - please check my proof of concept to solve this issue The idea is to gather events which should be sent through JS bridge if it isn't ready. Once JS part is ready then send didLoadWithEvents with all gathered events. Disclaimer:
|
Thanks @konradkierus, |
@manuquentin sure, please check #169 |
I see sometimes the JS Bridge doesn't start after receive a VoIP PN. It receives the VoIP PN, I report the new incoming call but the app never starts. It seems the JS Bridge thread is paused until you take some action on the CallKit screen. Even if I wait for a long time, I don't see the app starting. CallKeep: 3.0.9 Does anyone have this issue too? |
You can try NOT calling react-native-webrtc/react-native-voip-push-notification#52 This PR is a try which aims to solve |
Should be fixed in #205 |
A lot of work has gone into this now.... closing and if people still have large issues... then they should re-open a new issue |
Do you know when #205 is due to be merged? |
@danwhite-ipc nope - have you tried running it and seeing if it helps solve your problem? |
Handle issue with JS not initialized on start to fix #107
After updating to 3.0.3 and updating my code to meet iOS 13 requirements so CallKit is reported from AppDelegate. But the problem is that when app is closed or in background, the callKit displays very fast before my call class get loaded. So the callKit is shown on screen before listeners are ready and if I accept or reject the call immediately nothing happened. I need to wait for 3 seconds until call listeners are ready then I can accept or reject.
How can I delay the callKit in AppDelegate until my call class is fully loaded?
The text was updated successfully, but these errors were encountered: