Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backgrounded or Terminated iOS App "Destination number is unavailable" #44

Closed
henriquetroiano opened this issue Oct 1, 2022 · 7 comments

Comments

@henriquetroiano
Copy link

henriquetroiano commented Oct 1, 2022

Hello,

This issue is reproducible with the demo app!
Note: This does NOT happens on Android.

When we close or minimize the app, the call is rejected with the error "Destination number is unavailable". Doesn't matter if I register the token for push notifications or not.
When I minimize or close the app, the "onConnectionClosed is called". Maybe this behavior is expected, but the "Destination number is unavailable" is not expected.

Here is attached them both logs (flutter and call log) in two cases:
Explanation: the call_logs_1_done.txt file is the call I did with the app open: I receive, accept and let the call running for around 10s. Then I minimize the app with home iOS button and call again, with no success, this is the call_logs_2_unavailable.txt file.

  1. With the example app without registering push notifications >>
    flutter_run_verbose.txt
    call_logs_1_done.txt
    call_logs_2_unavailable.txt

  2. With the example app registering push notification >>
    flutter_run_verbose.txt
    call_logs_1_done.txt
    call_logs_2_unavailable.txt
    Note: In this case, I just updated the call_service.dart from example to include the token registration, with no success. I do not did any change on the code, just the token registration. Here is the screenshot of the line I changed:

Captura de Tela 2022-10-01 às 13 35 15

Looking deep at the logs, them both says "push certificate not found", so, I think that the regsiterForPushNotifications function is not working properly on iOS.

Setup:
MacBook Pro (Retina, 13-inch, Early 2015) >> MacOS Monterey 12.3.1 (21E258);
Iphone 7 Plus >> iOS 15.4.1

Software Specs:
Flutter: Version 3.0.5 (x86)
Xcode: Version 13.3 (13E113)
VSCode: Version 1.30.2 (1.30.2)
Cocoapods: Version 1.11.2

Maybe, this issue is related to the other one I created: #43

Thanks in advance,

@henriquetroiano henriquetroiano changed the title Backgrounded or Terminated App "Destination number is unavailable" Backgrounded or Terminated iOS App "Destination number is unavailable" Oct 1, 2022
@YesVladess
Copy link
Contributor

Hello, first of all, due to iOS specific we cannot maintain connection to Vox Platform while being in background mode, so after entering background "onConnectionClosed" event is expected.

For your main issue, it seems from the screenshot, that you are trying to register firebase token, which are not supported for iOS. We recommend you to switch to any library that supports registering token from PushKit Apple framework.

@henriquetroiano
Copy link
Author

hello, @YesVladess .
Yes, Firebase Token is currently supported by iOS and we already use it on our project. Is not supported by voximplant??

@henriquetroiano
Copy link
Author

We are perfectly able to use firebase tokens on iOS and perform notifications on the target phone. Is is not a push notification with payload ?

@YuliaGrigorieva
Copy link
Contributor

Hello @henriquetroiano

For iOS Push notification Voximplant platform communicates directly with APNS (Apple Servers) and does not use Firebase platform.

Moreover, for VoIP calls Voximplant platform sends a special type of Apple push notificaitons - VoIP pushes that are not supported by Firebase.

So, to get push notifications about incoming calls on iOS platform you need:

  • use any 3rd party package that provides the API for PushKit Apple framework
  • obtain a voip push token and register it to the Voximplant SDK
  • handle VoIP notification from PushKit Apple framework
  • integrate CallKit Apple framework as per Apple requirement for VoIP notifications

Best regards,
Yulia Grigorieva

@henriquetroiano
Copy link
Author

Ok, all done. Now, how can I integrate your callkit to the VIClient ???
The fresh example does not contain any example of integration from flutter_callkit_voximplant and flutter_voximplant. So I can't handle if I accepted or declined on the iOS side.

@henriquetroiano
Copy link
Author

henriquetroiano commented Oct 4, 2022

This is the only thing (except bug #43 ) that left on the app. The android app is OK!
Do you have an exemple with the integration between voximplant callkit and voximplant from the iOS side ?

@YuliaGrigorieva
Copy link
Contributor

Hello @henriquetroiano

Yes, you can take a look at our demo projects, especially at

Best regards,
Yulia Grigorieva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants