callkeep icon indicating copy to clipboard operation
callkeep copied to clipboard

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

Open tcc13 opened this issue 2 years ago • 7 comments

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

tcc13 avatar Apr 07 '22 01:04 tcc13

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 avatar Apr 21 '22 19:04 cmendes0101

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?

XuanTung95 avatar Jun 19 '22 08:06 XuanTung95

Nope, no errors that I recall @XuanTung95

cmendes0101 avatar Jun 20 '22 17:06 cmendes0101

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?

waleed-sofstica avatar Sep 02 '22 10:09 waleed-sofstica

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

fasikawsow avatar Sep 20 '22 03:09 fasikawsow

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.

fasikawsow avatar Sep 20 '22 04:09 fasikawsow

@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:

  • Make sure your Voip message work
  • Make sure the priority of the Voip message is the highest
  • Uninstall/re-install the app
  • Try package flutter_callkit_incoming

XuanTung95 avatar Sep 23 '22 01:09 XuanTung95