react-native-voip-push-notification: didReceiveIncomingPushWithPayload not called in background/terminated
Everything works fine when app is running in foreground, method gets called and call screen shows. If I minimize the app though nothing gets called and nothing gets logged even. I have read over the readme a million times and followed every step.
Added this:
Background Modes -> Voice over IP
Any thoughts? Running iOS 13.4.1 on iPhone XR w/ RN 0.61.5
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 17 (1 by maintainers)
For those still hitting this issue, you can ensure the terminated app receives the native voice notif by calling
voipRegistrationin yourAppDelegate.mas early as possible, insidedidFnishLaunchingWithOptions. I do it here after right after the bridge is initialized:This will call cause
didReceiveIncomingPushWithPayloadto properly be called on the native side when the app is terminated.Be sure to remove any duplicated call to the JS equivalent of
voipRegistrationso two delegates aren’t registeredSame behavior on my side
iPhone X on iOS 13.4.1 with RN 0.62.2
@chevonc
Tried adding this at same place you did to no avail, unfortunately. Still works when app is in foreground state though.UPDATE: It does actually work! I had to reinstall the app - the iOS system decides to terminate your app instantly if you fail to report to CallKit too many times, which I did during development and testing.
I am also having same issue, read a lot but not finding solution. We have implemented this solution https://github.com/nimbleape/react-native-callkeep along with this solution. Our iOS scenario,
In Foreground, Working fine
In Background, Not Working
In Killed State, Not Working
Please help.
thank you @acro5piano my problem is solved!