I have an application that is using VoIP, PushKit, and CallKit, the client needs the reported incoming video call like WhatsApp video call notification.
The problem that I'm facing when PushKit receive a notification and my app doesn't report an incoming call to the CallKit the app will crash.
I tried to understand how WhatsApp did this trick, but no luck on the web.
Any advice or idea will be helpfull
Very simple - you should avoid situations where you receive a PushKit notification without reporting an incoming call.
Even if you don't want to report this call, you can report an incoming call with caller name "Connection failed..." or something like that.
Related
For my VoIP app how to notify users about incoming calls as CallKit has deactivated in China. Is there any alternative to CallKit that I can use?
There's no alternative to CallKit. As far as I know, the only thing you can do is to use normal push notifications to notify an incoming call, as WhatsApp does for video calls even outside the China Appstore.
I am trying to develop whatsApp like calling feature in an application of mine.
For audio call, I am using VoIP to initialize the CallKit and it's working perfectly.
But I am not able to get Video call work just like whatsApp.
If I assume that whatsApp is delivering is VoIP and then showing local notification. But as per iOS 13 documentation, you have to report incoming call to CallKit if you are using VoIP.
And If I think of sending silent notification, it won't work if user killed the application manually.
I have thought of many solutions but none behaves like whatsApp does.
Can anyone help me with this? Any suggestion will be appreciated.
You can just use normal push notifications, they will always be delevered. Your server has to generate a push every n-seconds that tells the user that he has an incoming video call.
I am working on a video/audio call app. Now when my phone is locked and another user is calling me then from the lock screen I will get a notification and if I swipe the notification then the call automatically received. I used UILocalNotification for getting notification.
But I don't want like this. I want to see the UI same as when another user call me when my phone is unlocked that is there will be receive/reject option with my UI. I want to receive call like Viber or skype. How can I do that?
You should be looking into the PushKit framework form Apple.
The PushKit framework provides the classes for your iOS apps to
receive VoIP pushes from remote servers. VoIP pushes provide the
functionality that VoIP apps need to perform on-demand processing of
the push before displaying a notification to the user.
Apple Documentation
There are some tutorials might help you.
Tutorial 1
Tutorial 2
Update
To display the system-calling UI for your app's VoIP services you can use CallKit.
CallKit documentation
Sample code from Apple
Here is a tutorial which explains it well.
http://www.techjini.com/blog/enhance-voip-app-user-experience-using-pushkit-callkit/
https://www.raywenderlich.com/150015/callkit-tutorial-ios
I am currently working on an iOS app that allows users to make calls and send messages to eachother, effectively it is WhatsApp with a few extras.
When one of the users is offline, I send an APNS to the other user that brings up a short notification. The notification that is shown works well for messages but when it comes to an incoming call, it would be nice if it stuck around on screen and the phone vibrated for an extended period.
From what I have read, you cannot alter the vibration pattern of an APNS. WhatsApp, however, has managed to do it and I was wondering if anybody had an idea of how they achieve this?
You should use VoIP Push Notifications (PushKit). These are special push notifications intended to be used for VoIP call notifications.
Some source to get started:
http://blog.biokoda.com/post/114315188985/ios-and-pushkit
http://pierremarcairoldi.com/ios-8-voip-notifications/
I'm developing an iOS app that sends sms. What's the best way to handle a incoming message when the app is active. Is this done automatically or do I have to code for this in my app via the
applicationWillResignActive:(UIApplication *)application
method?
You don't need to/shouldn't need to deal with incoming SMSs.
When the device receives an SMS (or an iMessage these days), then the user will be notified by their method of choice. They may leave your application via that notification, but you cannot determine that it was the SMS that caused it.
CoreTelephony provides some abilities for people to deal with Calls, but nothing to do with SMS. Sorry. As such your app cannot determine the state of SMS messages. You're able to send SMS messages because the OS provides you with a view controller to do so, but you can't do anything else with them.