We are attempting to update our app to use the PTT framework, as it has been made clear that this will be required in a future iOS version as opposed to using the Unrestricted VoIP entitlement we are using for several features of our app.
However, the behavior of this framework poses some problems with implementing our app's functionality:
It is not possible to programmatically join a channel when the app is not in the foreground. This hinders our ability to implement the Automatically activate radio stream feature of our app, which allows users who have opted into this feature to immediately begin hearing live PTT audio from their agency following an incident alert. Having the app constantly "joined to a channel" and using the restoration delegate could potentially work, however this is not ideal as this would result in the PTT UI needing to be displayed at all times, even when no radio stream is activated.
We have a "Text to Speech" option that, when enabled, reads out the content of an incident alert after the alert sound has played. This currently happens by triggering an AVSpeechSynthesizer in the PushKit incoming push callback. It may be possible to render TTS audio on the fly in a Notification Service Extension and assign it as the notification's sound, if that is possible this is less of a problem.
We also use the PushKit callback to, again if the user has enabled it, activate a "Shake to Respond" feature, allowing a short period of time after receiving an incident alert in which the user can shake their device to indicate that they are responding to the incident. There does not appear to be any way to have the level of background execution required to implement this using an NSE, and this is of course beyond the scope of the PTT framework.
What options do we have to be able to continue to provide this functionality, without risk of it being disabled in a future iOS version?
PushKit
RSS for tagRespond to push notifications related to your app’s complications, file providers, and VoIP services using PushKit.
Posts under PushKit tag
56 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
In mainland China, CallKit is not available. Recently, I discovered LiveCommunicationKit.
Can it replace CallKit?
There is no relevant introduction in the documentation. Can someone help me understand how to use it?
https://developer.apple.com/documentation/livecommunicationkit
Hi everyone,
I am developing a VoIP calling feature in my Flutter app, using:
Agora RTC Engine for real-time calls.
CallKit & PushKit (VoIP notifications) for iOS call handling.
Firebase Cloud Messaging (FCM) for notifications.
Problem: CallKit UI Stays on Screen When Caller Hangs Up (Background/Terminated)
I am using Firebase notifications to notify the receiver that the call should be dismissed, but it doesn’t work in the following cases:
App is in the background – CallKit UI remains stuck even after receiving the Firebase notification.
App is terminated – The Firebase notification does not trigger any background execution, so CallKit UI stays forever.
Current Implementation
I send an FCM notification to inform the receiver to dismiss CallKit UI.
When received in the foreground, it works fine (callEnded method is triggered).
But in background or terminated state, the notification is not received or doesn’t execute the code.
CallKit and WebRTC are used to realize the call functionality.
You can select video, voice, or text calling as your calling method.
When making a text call, the voice input is grayed out and cannot be used, is there a solution?
I am developing an app where the primary feature is to notify users.
To deliver notifications more effectively, I am considering using PushKit and CallKit.
Would it be acceptable under the guidelines to use PushKit and CallKit as an optional feature for an AI agent to notify users via a phone call?
I am developing an application that uses NetworkExtension (Local PUSH function) And VoIP(APNs) PUSH.
Nowadays, I found a problem on this app doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an APNs PUSH.
My confimation result of my app and server log is below.
11:00 AM:
my server(PBX) requests a VoIP(APNs) PUSH notification to the APNs.
But my app does not receive the VoIP(APNs) PUSH.
At this time, my app is running on LAN (Wi-Fi without internet connection), as a result, NetworkExtension was running. so I think this is normal behaviour.
14:55:11 PM:
There is an incoming call from the my server(PBX) via local net, and NetworkExtension calls iOS API(API name is reportIncomingCall).
However, iOS does not call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall.
14:55:11 PM:
At almost the same time, iOS calls the delegate cdidReceiveIncomingPushWithPayload of VoIP PUSH.
(instead of call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall?)
And the content of this VoIP(APNs) PUSH was the incoming call at "11:00 AM".
In other words, the VoIP(APNs) PUSH at 11:00 AM is stuck inside iOS, and at 14:55:11 PM, from NetworkExtension reports it.
I feel there is a problem on iOS doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an VoIP(APNs) PUSH.
Would you tell me Apple's opioion about this?
If this is known problem, Please tell me about it.
I tried below at 2:00 PM on 21/01/2025(JST).
Apple Push Notification service server certificate update
I followed above,
a new server certificate: "SHA-2 Root : USERTrust RSA Certification Authority certificate" was added to my push server, but a certificate error occurred and push notifications could not be sent.
So I refered this article,Instead of connecting via DNS name resolution at api.development.push.apple.com,
I fixed api.development.push.apple.com to "17.188.143.34" in /etc/hosts,
I could push notifications with the new server certificate.
(I got this IP(17.188.143.34) from this airtcle)
From this, I suspect that Apple had not yet updated the APNs certificate (CA) for the Sandbox environment as of 2:00 PM on January 21, 2025 (JST).
Was the update published as scheduled?
I am developing "local push" VoIP application.
I have a question about issues I found while testing this app.
After repeating a test for 24 hours in which a incoming call followed by an immediate disconnect 0.1 seconds later,
the iPhone of incommig call side encountered a 0xBAADCA11 error, causing iOS to force-close the app.
(The incidence is low, occurring three times in 17280 times incoming call(24 hours.))
This problem found on iOS17.6.1 (iPhone11Pro).
When the same test was performed on iOS18.2 (iPhoneSE3), the problem did not occur.
Did iOS take something measures against the 0xBAADCA11 error between iOS17.6.1 and iOS18.2?
If yes, I want to encourage customers to upgrade to the latest iOS version, please tell me about it?
※I have attached an ips files and sysdiagnose file of the 0xBAADCA11 error occurring. (please refer sysdiagnose also if you need.)
FjSoftPhone-2025-01-16-113049.ips
FjSoftPhone-2025-01-16-175253.ips
FjSoftPhone-2025-01-17-070449.ips
[sysdiagnose_2025.01.17_14-24-48+0900_iPhone-OS_iPhone_21G93.tar.gz]
https://drive.google.com/file/d/1CV8laKzdnQxvwaAIOwMcXL8rAYL2jq35/view?usp=sharing
Hello,
I am currently developing a call service using CallKit and VoIP push. Recently, I have encountered a very challenging issue. During testing, when a VoIP push is received, the incomingCall gets triggered continuously, but then it automatically terminates after about 1-2 seconds. I am checking this issue under the debug scheme, and even when switching to different commits, the same problem persists.
I suspect it might be an issue with the device, but I would like to confirm the cause and find a solution. Below are some characteristics I have noticed:
On this device, when a VoIP push is received, CallKit automatically terminates, but this does not occur when debugging.
The issue always occurs when not debugging.
Looking at the device console logs related to callservicesd, there are many logs with 'invalidate' appended.
For example:
Invalidating process assertion for bundle ID from timeout
All calls ended. Clearing system uplink muted cache
Invalidate callDurationUpdateTimer
InCallService has changed process state to 2
InCallService has been suspended; invalidating its XPC client connections.
[0x565544180] invalidated because the current process cancelled the connection by calling xpc_connection_cancel()
XPC connection invalidated from client
These logs appear although our server did not receive any incoming call request, so we did not terminate it on our end. I also checked if there was a crash, but there were no reports left on the device.
Could you please share any insights into the cause or solutions for this situation?
Thank you.
I am trying to add voip call functionality to my app.
It works as expected while the app is in the foreground. But in the background it does not.
I have registered the app as requiring background voip permissions.
My implementation doesn't fit into one of these posts, so here is a gist:
https://gist.github.com/BrentMifsud/4be43c022c1279f04ecb56250a86b3f1
We have just been granted access to the com.apple.developer.usernotifications.filtering entitlement, and are following the documented steps for handled E2EE VOIP notifications listed here: https://developer.apple.com/documentation/callkit/sending-end-to-end-encrypted-voip-calls
1 - A user initiates a VoIP call on their app. Their app then sends an encrypted VoIP call request to your server.
We do exactly this, Alice calls Bob from her app, sending a notification to our servers.
2 - Your server sends the encrypted data to the receiver’s device using a regular remote notification. Be sure to set the apns-push-type header field to alert.
We do exactly this, our server send on a notification to APNS with the apns-push-type header set to alert, destined for Bob.
3 - On the receiver’s device, the notification service extension processes the incoming notification and decrypts it. If it’s an incoming VoIP call, the extension calls reportNewIncomingVoIPPushPayload(_:completion:) to initiate the call. It then silences the push notification (see com.apple.developer.usernotifications.filtering).
I try to do exactly this. The notification is received by the NSE on Bob's device, which decrypts it and then notices it is a VOIP call from Alice. It prepares a dictionaryPayload with the decrypted data and then calls reportNewIncomingVoIPPushPayload(_:) async throws. This throws an NSXPCConnectionInterrupted error, which when logged shows as below:
Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.callkit.notificationserviceextension.voip" UserInfo={NSDebugDescription=connection to service named com.apple.callkit.notificationserviceextension.voip}
The only difference I can see to the documentation is that I am working in an asynchronous context so am using the asynchronous version of the method, but I don't imagine this should cause an issue?
I then supress the notification as documented and this works correctly.
Does anyone have any ideas why I am getting this error when calling reportNewIncomingVoIPPushPayload(_:) async throws?
You are probably aware of the upcoming root certificate change for any servers you might have that you use to send push notifications by connection to APNs.
If you are not, here is the announcement.
We have been getting some questions about this, and understand not everyone is familiar with their server setup.
First, we would like to clarify that this is only a change to your server's certificate trust store. You do not need to update anything else, like your APNs push certificates, the build certificates and provisioning profiles for your team/app, and so on. All you need to do is to install the mentioned new root certificate to your push server's trust store.
If you are using a 3rd party push provider, it is them who will need to handle their servers. But you may want to double check with them nevertheless.
If you are managing your own push servers that connect to APNs directly, then it is your responsibility to download and install the root certificate mentioned in the above link on your server(s).
Unfortunately we cannot provide specific instructions on how to install this root certificate on every kind of server out there. Each server operating system/push server software will have different ways these root certificates are installed, which is out of scope of our support abilities.
If you are not sure how to do this, I would recommend you seek help for this from your server-side developers or server admins.
Or, if you don't have access to such resources, you can ask the support channels for your system the question: How do I install a root certificate?
We have setup a test server at 17.188.143.34:443 that you can use to try and send pushes to test whether your new root certificate is correctly installed.
An alternative way to test this would be, from a terminal prompt:
openssl s_client -connect 17.188.143.34:443 -servername api.sandbox.push.apple.com -verifyCAfile USERTrustRSACertificationAuthority.crt -showcerts
Change the parameter to the -verifyCAfile argument to point to your trust store, and it should allow you to validate
Sample return results would be:
Connecting to 17.188.143.34
CONNECTED(00000003)
depth=2 C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Certification Authority
verify return:1
depth=1 CN=Apple Public Server RSA CA 11 - G1, O=Apple Inc., ST=California, C=US
verify return:1
depth=0 C=US, ST=California, O=Apple Inc., CN=api.sandbox.push.apple.com
verify return:1
Argun Tekant /
DTS Engineer /
Core Technologies
I get the error message in Xcode signing certificate
Provisioning profile "iOS Team Provisioning Profile: com.example.app" doesn't include the pushkit entitlement.
I have push notifications ticked in my Identifier in the online developer account. There is no other dedicated pushkit capability available to select.
Push notifications, time sensitive notifications and background mode-> voice over ip are added as capabilities in the Xcode project.
The team provisioning profile for the app states under its enabled capabilities: both push notifications and time sensitive notifications.
Is pushkit part of another capability that I need to select?
I have read the guide below and it just says to add the push notification capability. https://developer.apple.com/documentation/pushkit/supporting-pushkit-notifications-in-your-app
I have gone round and round in circles trying to get this profile to work for this, so any pointers would be much appreciated.
Thanks
I am trying to build a chat app. I am using FCM to deliver messages to my app accompanied by some custom data like the new message_data, deleted message_id and so on; each message will need to run the app in the background to do some background processing and local database syncing.
This continuous background processing is clearly not acceptable as APNs imposes a per-device limit on background push notifications . I am asking how can I push messages and actions payload without being throttled ?
I'm facing an issue delivering VoIP push notifications to user devices. It's pretty random, sometimes notifications are delivered and sometimes not. I've had a call with the user to understand and narrow down the issue, including testing delivery of pushes to their device token via Push Notification Console as described here: https://developer.apple.com/documentation/usernotifications/testing-notifications-using-the-push-notification-console#4181180.
I asked a user to use Wi-Fi first and tried delivering around 10 pushes via console and 2 of them were lost while the rest was delivered.
I asked a user to use cellular and tried delivering also around 10 pushes and most of them were lost and only few of them were delivered.
Production environment was used to deliver pushes hence I cannot see delivery log and so I have no visibility over a reason why push wasn't delivered.
I wanted to file a code-level support ticket to get help however I need to supply a sample xcode project which in this particular case doesn't make any sense as I'm using Apple's Push Notification Console tool and it delivers pushes in some cases while doesn't deliver it in other cases.
I'm pretty familiar with all potential reasons why push might not be shown on device, including app early crashes, not reporting a call to CallKit etc. => although you never know, I'm pretty sure it's not our case.
How can I get support on investigating specific user device token delivery issues like in the case I described above? I have device token and push console records but it's not clear how to get support on that.
Thank you!
My VoIP app is installed on an iPad, but can't accept incoming calls by VoIP push.
But it works after I force-restart this iPad. I have some customers who encountered the same cases, fixed by force-restart too.
So my question is
What happened on the APNs connection after force-restart?
At what case, the APNs connection will be off?
I am developing a VOIP app which should also work in China region. I want to detect whether there are any other calls active or ended. This functionality is can be achieved using Callkit CXCallObserver. But CallKit cannot be used in China. So is there any other alternative way to achieve what CXCallObserver offers?
How can I show my VoIP calling app in the same list as Facetime and Whatsapp as shown in the image?
My app implements VoIP calls and is integrated with CallKit.
Any tip would be appreciated!
I am an iOS development engineer. Recently, I updated the Xcode version to 16.1 (16B40) and updated my debugging device (iPhone 15) to iOS 18.1.1. However, I found that I could not respond to the delegate method.
I confirmed that my code, certificate, Xcode settings, and network environment had not changed. Simply executing
application.registerForRemoteNotifications()
in
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
did not receive a response(didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotificationsWithError ).
In the same environment, when I switched to another device for debugging (iOS 17.0.3), the delegate method would respond.
I really don't know what to do, I hope someone can help me, I would be very grateful.
Please note: Everything is normal when using devices before iOS 18.1.1 version
We have modified the program as we received in the previous(thread 764479) issue.
Our program works very well and the notification problem has been almost solved in the test.
Then, we tested it in the user's environment.
At that time, one of the three iPhones stopped receiving notifications.
After 10 minutes, VoIP notifications were received again.
This device received PUSH notifications even when VoIP notifications did not come.
We must explain to the user why this incident occurred.
We would like to know if these three notifications were sent correctly to the device.
Also, is there any other way for us to deal with this other than improving the network?
[APNS LIST]Nov. 20th
could not receive(failed)
15:06:13 5793987C-D1A4-811F-917F-87DD7F5083B3
15:07:09 667E0A2F-43B5-37FC-2F2A-45A6C27EFC34
15:19:31 1353DF78-519E-B1DC-82B7-8B890E59FE37
received(success)
15:04:09 19CC1937-533A-9AF4-9472-41C839E461D7
15:35:00 CD23AC57-6EC7-4523-941F-B103EDB4DEFB