twilio / voice-quickstart-objc

Twilio Voice Quickstart for iOS with Objective-C
MIT License
39 stars 24 forks source link

Notification not receiving after app close #102

Closed volkoffindia closed 6 years ago

volkoffindia commented 6 years ago

Hello I am doing VOIP with twillo calling. Application is allow notification while app is background or foreground. we are not received notification while app is close. I have written code in AppDelegate.. But register with Push after socket is connected.

bobiechen-twilio commented 6 years ago

Hi @arvd

Don't worry, it's probably some small detail that we've missed here.

Thanks, -bobie

volkoffindia commented 6 years ago

Hello Bobie Yes I am getting successful register Twilio and also get token. Yes I get notification while all is active and background. Here is my SID: CR14a04681443dd5dfc564cad97e86cc3f

Thanks, Arvind

volkoffindia commented 6 years ago

and I am also see Call Logs in Twilio account.. Here I attached screenshot.when app close showing in call logs but notification doesn't appearer.

screen shot 2018-04-23 at 10 59 34 am
bobiechen-twilio commented 6 years ago

Hi @arvd

Thanks for providing the Push Credential. We've checked the database with it but things looks perfectly functioning. One more thing you can help us check - (assuming that your app is written with Xcode 9) does your app project have the background mode configured properly in the plist to support audio and voip? you can find more instruction in the quickstart README.

-bobie

volkoffindia commented 6 years ago

Hello Bobie Yes I am using Xcode 9.2 and my application source code is 2 years old but I am using Xcode 9.2 now. and yes I have added background and voip setting in plist.

bobiechen-twilio commented 6 years ago

Hi @arvd

How does your app show the incoming call when it gets a call notification while it's in the background? do you use UILocalNotification or do you report the call to the CallKit framework? If it is not too much trouble, could you also try using the quickstart and see if the same issue is happening? just want to first make sure your account credentials and the notifications settings are correctly configured.

Thanks -bobie

volkoffindia commented 6 years ago

Hello Bobie I am using call kit framework.. it was difficult for me to integrating in quickstart demo. Yes credentials are correctly configured.. I received call when background and foreground..

bobiechen-twilio commented 6 years ago

Thanks and no worries @arvd, looks like your credentials are functioning correctly. To try the (CallKit) quickstart, simply replace a couple of items in the project:

bobiechen-twilio commented 6 years ago

Hi @arvd

Just want to touch base - have you found the root cause that your app is not getting call notification when it is terminated?

-bobie

ankitpatelka commented 6 years ago

Hello Bobie/@arvd,

I am also facing same issue. In my case i am using quick start demo app, now in this app i have just put single page interface ahead of 'Viewcontroller' for calling automatic to fix userid. i am able to call using that functionality.

But now when i close app(killed) and call to that user from another device, i am not getting incoming VOIP call from call-kit(APP is killed not active).

Once i open call and register with VOIP and perform fetch access token. i am able to get same call. in both case app is in foreground/background.

And another finding, if i run raw quick start app it will works fine. Any quick suggestions so i can fix this.

bobiechen-twilio commented 6 years ago

Hi @ankitpatelka

One suggestion is to try using the quickstart and add the similar UI flow to it, then see at which step the app stops showing incoming calls when it's not in the foreground.

ankitpatelka commented 6 years ago

Thanks Bobie it was worked for me, that is issue related Configuration of Callkit (CXProviderConfiguration).

bobiechen-twilio commented 6 years ago

Awesome @ankitpatelka 👍

bobiechen-twilio commented 6 years ago

Hi @ankitpatelka

Can you share how you fixed the issue with the CallKit config? this might be helpful also for other SDK users.

Thanks! -bobie