flutter-webrtc / callkeep

iOS CallKit and Android ConnectionService for Flutter
MIT License
130 stars 139 forks source link

[iOS] Unable to receive push when app closed or inactive in the background #140

Open tcc13 opened 2 years ago

tcc13 commented 2 years ago

Hi, I'm using callkeep to handle calls in my project, however I've got problems that incoming call is not receiving when state of the app is closed or inactive in the background, but I do get it in the foreground. Any idea what is wrong?

A little bit finding from me, not sure if its related, I used instruments to simulate background fetch and objects that I highlighted in the image below are not instantiated. (top one its the example app, below one its my app)

Group 1

p/s: the example app its working perfectly

callkeep: ^0.3.2

[✓] Flutter (Channel stable, 2.10.2, on macOS 12.1 21C52 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 13.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.66.0) [✓] Connected device (3 available) [✓] HTTP Host Availability

cmendes0101 commented 2 years ago

I had the same issue and it was due to background push notifications being blocked after failing to call Callkit inside reportNewIncomingCall 2-3 times. It was failing in reportNewIncomingCall due to an issue in my push notification payload when testing(I was using an alert parameter).

To reset the block, I had to uninstall the app and reinstall it. After that, the background notifications started working correctly.

XuanTung95 commented 2 years ago

I had the same issue and it was due to background push notifications being blocked after failing to call Callkit inside reportNewIncomingCall 2-3 times. It was failing in reportNewIncomingCall due to an issue in my push notification payload when testing(I was using an alert parameter).

To reset the block, I had to uninstall the app and reinstall it. After that, the background notifications started working correctly.

@cmendes0101

How do you know it's blocked. Is there an error log that said the app is blocked?

cmendes0101 commented 2 years ago

Nope, no errors that I recall @XuanTung95

waleed-sofstica commented 1 year ago

I had the same issue and it was due to background push notifications being blocked after failing to call Callkit inside reportNewIncomingCall 2-3 times. It was failing in reportNewIncomingCall due to an issue in my push notification payload when testing(I was using an alert parameter).

To reset the block, I had to uninstall the app and reinstall it. After that, the background notifications started working correctly.

Can you please share your IOS payload with us?

fasikawsow commented 1 year ago

@tcc13 Do you manage to fix the issues? I am in the same situation. If you find any solution, please share with us.

fasikawsow commented 1 year ago

Nope, no errors that I recall @XuanTung95

Can you share your payload? and a little bit of clarification on how you solve it. I am in the same situation.

XuanTung95 commented 1 year ago

@tcc13 Do you manage to fix the issues? I am in the same situation. If you find any solution, please share with us.

@fasikawsow, you could try to: