17

i am using pushKit in my App but didUpdatePushCredentials delegate never called. xcode 9 not having Voice over IP

Capabilities --> Background Modes --> Voice over IP

enter image description here

i am following this link..implement pushkit

certificates generated again but not working.

  • My app also uses PushKit and doesn't work anymore if built with Xcode 9 (currently beta 5). I see the push messages arrive in the iOS system console (APSCourier Received message for enabled topic '...' with payload...) but the messages does never reach didReceiveIncomingPushWithPayload in my app. – user1195883 Aug 17 '17 at 14:26

4 Answers4

31

Although, Xcode 9 is announced officially, still there isn't VoIP on the capabilities.

I solved my problem by opening Info.plist as a source code and adding "voip" to UIBackgroundModes manually.

<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
    <string>voip</string>
    <string>fetch</string>
    <string>remote-notification</string>
</array>
Seref Bulbul
  • 1,163
  • 12
  • 14
  • 1
    This is the correct solution, voip capability doesn't exist anymore. Adding this will enable the call to didUpdateCredentials. – ydemartino Sep 28 '17 at 15:16
  • 1
    Added in plist but, still not showing in capabilities – Vineesh TP Mar 30 '18 at 00:38
  • 1
    @VineeshTP Although it does not show in the capabilities, it still works. – Seref Bulbul Mar 30 '18 at 06:25
  • 1
    Thank you so much. This worked. I don't understand why they removed the "Voice over IP" option from capabilities without which we cannot receive the token. I thought i was missing something in the code, but adding voip worked. Thanks again. – Sujithra Apr 04 '18 at 11:40
1

according to Apple forum discussion this is the answer

"In iOS 10, you should be using PushKit for handling push notifications for incoming VoIP calls. So when you build your app against the iOS 10 SDK, you need to move over to PushKit (which can be supported all the way back to iOS 8, but once you move to iOS 10 our recommendation is to update your minimum deployment target to iOS 9). "

original link of the answer: https://forums.developer.apple.com/thread/50106

Amitabha
  • 1,664
  • 1
  • 12
  • 30
1

I experimented with the settings and I only need to enable VOIP as a background mode.

Open Info.plist as source and add make sure it contains the following:

<key>UIBackgroundModes</key>
<array>
     <string>voip</string>
</array>

I also needed to enable Push Notifications like this: enter image description here

Sam
  • 5,375
  • 2
  • 45
  • 54
-2

Might be this is a bug in Beta version because there is no official announcement or article or anything about redeeming VOIP background mode from XCode 9.

Or possible once you implement Callkit , VOIP background mode automatically considered.

I suggest wait for XCode 9 official version.

Updated answer

With XCode 9 and iOS 11, Callkit is being compulsory for VOIP implementation. Background mode ( VOIP ) will be automatically activated once integrating Callkit.

Try to make call from WhatsApp, that call history will be available in native phone call app as well.

Updated answer -> You are can add background modes support manually

<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
    <string>voip</string>
    <string>fetch</string>
    <string>remote-notification</string>
</array>
Hasya
  • 9,792
  • 4
  • 31
  • 46