Closed sametcl2 closed 1 year ago
@sametcl2 I'm experiencing the same behavior, were you able to figure out why this happens?
@sametcl2 I'm experiencing the same behavior, were you able to figure out why this happens?
I've added listener like this, top of the listeners useEffect, it seems like solved the problem for me.
RNCallKeep.addEventListener('didChangeAudioRoute', ({ output }) => { console.log('didChangeAudioRoute'); });
when I was using only react-native-webrtc, I did not see this warning. However, right after installing react-native-callkeep, I started seeing this warning message even though I did not modify any of the code yet.
@sametcl2 I'm experiencing the same behavior, were you able to figure out why this happens?
I've added listener like this, top of the listeners useEffect, it seems like solved the problem for me.
RNCallKeep.addEventListener('didChangeAudioRoute', ({ output }) => { console.log('didChangeAudioRoute'); });
I'm sorry to say but this is not working :/ I really don't know why this is happening.
@geoffcfchen is this warning preventing trigger of answerCall event?
This issue happened on my end because I was answering a phone call in AppDelegate files before the RN code started. This was caused by me having setup VoIP in iOS native code, so I instead let the JS part handle the VoIP registration of the device. It added some delay than the previous solution but this warning went away and I was able to answer the call properly
This issue happened on my end because I was answering a phone call in AppDelegate files before the RN code started. This was caused by me having setup VoIP in iOS native code, so I instead let the JS part handle the VoIP registration of the device. It added some delay than the previous solution but this warning went away and I was able to answer the call properly
Hi @stevenbdf thanks for your answer. How did you register in js side. Can you give me example please?
Hello @stevenbdf! Thank you for comment. I understand that iOS needs to run Callkeep as quickly as possible. Otherwise, I understand that the app will be terminated. In this situation, how can I use a method to launch Callkeep after the jsBundle is loaded without the app closing?
Hello @stevenbdf! Thank you for comment. I understand that iOS needs to run Callkeep as quickly as possible. Otherwise, I understand that the app will be terminated. In this situation, how can I use a method to launch Callkeep after the jsBundle is loaded without the app closing?
I think that's the recommendation from iOS yes. But from what I was able to experiment in my app, it is not mandatory. I had to remove the voipRegistration
from the delegate file and I simply initially RNCallkeep in my React Native code. It can be done inside a screen, provider or layout that you make sure it's rendered when your app is awaken from background mode. In my case I put and invoke the RNCallKeep.setup(callKeepOptions)
in a navigation Provider that's only rendered when the user is logged in.
AppDelegate.mm
authenticated-navigation.tsx
안녕하세요@stevenbdf! 의견을 보내주셔서 감사합니다. iOS에서는 Callkeep을 최대한 빨리 실행해야 한다는 점을 이해합니다. 그렇지 않으면 앱이 종료되는 것으로 알고 있습니다. 이 상황에서 jsBundle이 로드된 후 앱을 닫지 않고 Callkeep을 시작하는 메서드를 어떻게 사용할 수 있습니까?
나는 그것이 iOS의 권장 사항이라고 생각합니다. 하지만 내 앱에서 실험해 본 결과 필수는 아닙니다.
voipRegistration
위임 파일에서 를 제거해야 했고 처음에는 React Native 코드에서 RNCallkeep을 사용했습니다. 앱이 백그라운드 모드에서 깨어날 때 렌더링되는지 확인하는 화면, 공급자 또는 레이아웃 내에서 수행할 수 있습니다.RNCallKeep.setup(callKeepOptions)
제 경우에는 사용자가 로그인할 때만 렌더링되는 탐색 제공자에 를 넣고 호출했습니다 .
AppDelegate.mm
authenticated-navigation.tsx
Hmm... thank you. I'm having a lot of worries.
Hello @stevenbdf! Thank you for comment. I understand that iOS needs to run Callkeep as quickly as possible. Otherwise, I understand that the app will be terminated. In this situation, how can I use a method to launch Callkeep after the jsBundle is loaded without the app closing?
I think that's the recommendation from iOS yes. But from what I was able to experiment in my app, it is not mandatory. I had to remove the
voipRegistration
from the delegate file and I simply initially RNCallkeep in my React Native code. It can be done inside a screen, provider or layout that you make sure it's rendered when your app is awaken from background mode. In my case I put and invoke theRNCallKeep.setup(callKeepOptions)
in a navigation Provider that's only rendered when the user is logged in.
AppDelegate.mm
authenticated-navigation.tsx
@stevenbdf Your solution works as expected. It's amazing. Thank you. It seems that the call is executed after all event listeners are ready. Is there a possibility that bundling may be delayed?
Bug report
[x] I've checked the example to reproduce the issue.
Reproduced on:
Description
In iOS CallKit screen shows up. After answering call I got the error Sending
RNCallKeepDidChangeAudioRoute
with no listeners registered.Steps to Reproduce
Versions
Logs