react-native-callkeep
react-native-callkeep copied to clipboard
Fixes issue 406: Use Objective-C Key Value Coding(KVC) to sync _RTCEventEmitter_ `_listenerCount`.
Fixes issue 406: Use Objective-C Key Value Coding(KVC) to sync RTCEventEmitter _listenerCount
.
(see https://github.com/react-native-webrtc/react-native-callkeep/issues/406).
Here we use KVC to synchronize RTCEventEmitter _listenerCount
to make sure it is always valid, and that we don't end up a broken & invalid state.
@Romick2005 Any thoughts on this?
I am not big expert in Objective-C. So if you are able to modify _listenerCount private variable of the RCTEventEmitter class, and it works, than it is good. I had some doubts that those variable is accessible for ancestor classes, but as I said, if it really updates it, then it is ok.
how do we use this ? We're having an issue where on app install, CodePush updates the app and kills the event listeners.
~~@shawarmaz this turned out not to be linked to code-push.~~
@shawarmaz To be honest I don't have a clear memory of this bug as it was many months ago. If you want to try this fix you can either use patch-package with the code contained in this PR -or- you could point your package.json to https://github.com/Paltap-io/react-native-callkeep
I can't make any promises but at the moment the only difference between that branch and upstream is this PR.
Thanks @glesperance tested it, works perfectly.