iOS 13 VoIP push incoming call requirements

Hello,


I work for an organization that provides push-to-talk communication for businesses. We are using VoIP push notifications as a way to inform the app of a new incoming push-to-talk message, which we then stream and play the corresponding audio. This happens on a message-by-message basis, as opposed to an ongoing call.


iOS 13 introduces new requirements, detailed here https://developer.apple.com/videos/play/wwdc2019/707/, which now require VoIP push notifications show a full-screen incoming call interface (via CallKit) that the user must interact upon the reception of each notification. In order to continue providing customers with the experience they have asked for, we need a way to deliver and auto-play audio messages while the app is in the background, without interrupting what the user is doing. iOS 13 breaks this capability, are there plans to provide a way forward for this use case?

Accepted Reply

The specifics of how your app should work are going to vary a lot depending on your specific use cases and app design, but our general recommendation for push to talk apps is that you shift to using standard push notifications instead of PushKit for message delivery. More specifically, on the receiver side your Notification Service Extension should download the relevant audio and attach that sound to your particular message.


To support that approach, starting in iOS 13, the system looks for possible sound files in the apps group container(s) as well as the preexisting search locations. The documentation hasn't been updated for this yet (<rdar://problem/49122720>), but there is header file documentation describing the details in the comments for "soundNamed:" in "UNNotificationSound.h":


// The sound file to be played for the notification. The sound must be in the Library/Sounds folder of the app's data container or the Library/Sounds folder of an app group data container. If the file is not found in a container, the system will look in the app's bundle.


Breaking that down in detail, we look for sound files in the following order and locations:


  1. Your apps direct container in "Library/Sounds".
  2. Your apps group(s) directory in a directory named "Library/Sounds"
  3. Your apps bundle


The main things to keep in mind here:

  • Directory #2 is "Library/Sounds", not just "Sounds". You'll need to create a "Library" directory with a "Sounds" directory inside it, not just a "Sounds" directory.
  • The apps direct container is still the first place we'll look, so you'll need to be careful about how you name your files. I would recommend either using the group directory for all sounds or following a naming convention for the two different locations so that they never collide. Your Network Service Extension can't see the contents of directory #1, so it can't know whether or not a particular name will collide.

Replies

Apple engineers say that we should use the regular and silent pushes for all cases not related to the real voice call.

I'd like to hear all ideas about the subject too.

The specifics of how your app should work are going to vary a lot depending on your specific use cases and app design, but our general recommendation for push to talk apps is that you shift to using standard push notifications instead of PushKit for message delivery. More specifically, on the receiver side your Notification Service Extension should download the relevant audio and attach that sound to your particular message.


To support that approach, starting in iOS 13, the system looks for possible sound files in the apps group container(s) as well as the preexisting search locations. The documentation hasn't been updated for this yet (<rdar://problem/49122720>), but there is header file documentation describing the details in the comments for "soundNamed:" in "UNNotificationSound.h":


// The sound file to be played for the notification. The sound must be in the Library/Sounds folder of the app's data container or the Library/Sounds folder of an app group data container. If the file is not found in a container, the system will look in the app's bundle.


Breaking that down in detail, we look for sound files in the following order and locations:


  1. Your apps direct container in "Library/Sounds".
  2. Your apps group(s) directory in a directory named "Library/Sounds"
  3. Your apps bundle


The main things to keep in mind here:

  • Directory #2 is "Library/Sounds", not just "Sounds". You'll need to create a "Library" directory with a "Sounds" directory inside it, not just a "Sounds" directory.
  • The apps direct container is still the first place we'll look, so you'll need to be careful about how you name your files. I would recommend either using the group directory for all sounds or following a naming convention for the two different locations so that they never collide. Your Network Service Extension can't see the contents of directory #1, so it can't know whether or not a particular name will collide.

Hi,

I am trying to find some documentation how to implement the reportNewIncomingCallWithUUID method in -

- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type

I couldn't find a complete documentation, does anyone know where i can find it?