notificationsios10voippushkit

voip push notification doesn't work on ios 10 when lock screen


I am using PushKit for sending voip push notification to my APP. It works fine for iOS 9 and below.

But recently I was reported that the user unable to receive notifications when their phone in lock screen mode (on iOS 10).

I did few tests on it, on iOS 9, no matter if the screen was locked, all notification were received. On the other hand, on iOS 10, when a notification came, the screen was lighten up, but no other information, no sounds, no notification banner. That is, if the phone in lock screen mode, in your pocket, you were never be notified when a call is coming.

Is anyone has the same problem?


Solution

  • If you are using uilocalnotification in Xcode 8, then it is deprecated. This is May be reason of functionality not working properly.

    Try integrating usernotification.framework. It will available with Xcode 8.

    Moving from Xcode 7 to 8. If you have swift programming language. Then you need to convert code in swift 3. Most of Xcode will convert, may be rest of you need to rewrite.

    Some reference How to use iOS 10 UserNotifications framework in xcode 7.3.1 swift 2.2?

    https://developer.apple.com/reference/usernotifications

    https://github.com/hasyapanchasara/PushKit_SilentPushNotification