Send push notifications to Mac, iOS, iPadOS, tvOS devices through your app using the Apple Push Notifications service (APNs).

Posts under APNS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

New delivery metrics now available in the Push Notifications Console
The Push Notifications Console now includes metrics for notifications sent in production through the Apple Push Notification service (APNs). With the console’s intuitive interface, you’ll get an aggregated view of delivery statuses and insights into various statistics for notifications, including a detailed breakdown based on push type and priority. Introduced at WWDC23, the Push Notifications Console makes it easy to send test notifications to Apple devices through APNs. Learn more.
0
0
911
Oct ’23
New features for APNs token authentication now available
Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management. For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
0
0
375
2w
Not able to receive silent pushes in background
I’ve developed the Pro Talkie app—a walkie-talkie solution designed to keep you connected with family and friends App Store: https://apps.apple.com/in/app/pro-talkie/id6742051063 Play Store: https://play.google.com/store/apps/details?id=com.protalkie.app While the app works flawlessly on Android and in the foreground on iOS, I’m facing issues with establishing connections when the app is in the background or terminated on iOS. Specifically, I’ve attempted the following: Silent pushes and alert payloads: These are intended to wake the app in the background, but they often fail—notifications may not be received or can be delayed by 20–30 minutes, leading to a poor user experience. VoIP pushes: These reliably wake the app, but they trigger the incoming call UI, which isn’t suitable for a walkie-talkie app that should connect directly without displaying a call screen. I’ve enabled all the necessary background modes (audio, remote notifications, VoIP, background fetch, processing), but the challenge remains. How can I ensure a consistent background connection on iOS without triggering the call UI?
1
0
46
4h
iOS Blocking Websocket Reconnection After Multiple VoIP Push Notifications
Hello, We have a Push-to-Talk (PTT) application that is already well established and widely used. Our app has the proper VoIP entitlement, which we are using to wake up the app and establish a WebSocket connection for real-time communication. We are also using CallKit as a supporting mechanism, but not as the primary interaction upon receiving the VoIP Push, since our use case differs from traditional full-duplex VoIP calls. While our implementation works correctly in many cases, we have noticed a consistent issue where, after multiple VoIP Push notifications, the system still delivers the push, but prevents the WebSocket from reconnecting. At this point, all connection attempts return errors such as: • "Software caused connection abort" This issue persists until the app is manually relaunched, after which the behavior resets and repeats. We are aware that VoIP Push was originally designed for full-duplex calls, but since Apple allows its use for other purposes through the entitlement, we would like to understand why this limitation is occurring and how to handle it properly. Questions: 1. Is iOS enforcing stricter background execution rules after multiple VoIP Push events within a short period? 2. Are there any recommended best practices to ensure reliable WebSocket reconnection in this scenario?
0
6
168
3d
Location Push Extension Cannot Wake after 10 mins
Hi team, I'm developing a feature that's collecting the device locations for home security app. We've been following https://developer.apple.com/documentation/corelocation/creating-a-location-push-service-extension apns-push-type set to location. apns-priority set to 5. during testing, we found that the device's notification extension cannot be triggered after device going into lock screen for 10 mins. Wonder should we set the priority to 10? Thanks!
1
0
132
4d
Certification Authority (CA) for Apple Push Notification service (APNs)
I got a notification that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. Does this affect the push service for Apple Wallet passes or just for apps? I have a push service for Apple Wallet passes but no service for apps. I don't use push notification service for anything other than for Apple Wallet Pass push notifications, not at all for apps. Is there anything I need to do or is this not relevant to my situation? If it does, what do I need to change in order to make sure my service still works? Do I just replace the certificate? Is there a standard path where it would live on the server? I'm sure this is a simple thing, but it's been over a decade since I wrote the push service so I'm pretty rusty.
1
0
160
1w
Issue with app not waking up intermittently due to Pushkit (VOIP)
I am developing a VoIP service. Usually, when receiving a VoIP Push, Callkit is exposed immediately after receiving the message and the app is designed to be used. However, there is an extremely intermittent phenomenon (not well reproduced) where the app does not wake up even when receiving a VoIP Push. And after a long time, the app wakes up and Callkit is activated. (A long time after receiving the call…) Has anyone experienced the above phenomenon? I wonder if there are any reported parts depending on the OS version. (I have identified that it does not occur in the 17.x version, but it is difficult to guarantee because it occurs extremely intermittently) The app is not running in the background, but... Could this be happening if there are a lot of pending operations in the background? I need help urgently
3
0
164
6d
VoIP Push Notification Not Received in Background/Killed State
I am implementing flutter_callkit_incoming for handling call notifications in my Flutter app. However, I am facing an issue where VoIP push notifications are not consistently received when the app is in the background or terminated. According to Apple’s documentation: "On iOS 13.0 and later, if you fail to report a call to CallKit, the system will terminate your app. Repeatedly failing to report calls may cause the system to stop delivering any more VoIP push notifications to your app." I have followed the official installation guide: flutter_callkit_incoming installation and implemented all necessary configurations. However, VoIP notifications sometimes get lost and do not deliver reliably. Here is the payload I am using: { "notification": { "title": "New Alert", "body": "@H is calling you..." }, "android": { "notification": { "channelId": "channel_id", "sound": "sound_name.mp3" } }, "apns": { "payload": { "aps": {} } }, "data": { "title": "New Call", "body": "@H is calling you...", "notificationType": "CALL", "type": "NOTIFICATION", "sound": "sound_name" }, "token": "token" } I expect the call notification to appear even when the app is in the background or killed state. Has anyone encountered this issue and found a solution? Any insights would be greatly appreciated.
1
0
149
5d
Firebase Phone Auth OTP not working on TestFlight
Hi, I'm working in unity and I've implemented Firebase Phone Number Authentication in it. Everything works fine when I directly install build from xCode. App Attest screen shows up, user receives OTP on their phone and login works. But when I download the same build from TestFlight, it gets stuck after the user sends OTP request. I've added Push Notifications and App Attest in capabilities. I've also additionally added Remote Notifications. In device log I see an error about mobile provisioning file but I've added that to my account also. Is this expected behavior that phone number authentication does not work on TestFlight? If yes, how can I get this approved from apple since they need to test it before approving it. Thanks!
0
0
89
1w
Best Approach for Reliable Background Audio Playback with Audio Ducking on Command from Server
I am developing an iOS app that needs to play spoken audio on demand from a server, while ducking the audio of background music from another app (e.g., SoundtrackYourBrand or Apple Music). This must work even when the app is in the background, and the server dictates when and what audio is played. Ideally, the message should be played within a minute of the server requesting it. Current Attempt & Observations I initially tried using Firebase Cloud Messaging (FCM) silent notifications to send a URL to an audio file, which the app would then play using AVPlayer. This works consistently when the app is active, but in the background, it only works about 60% of the time. In cases where it fails, iOS ducks the background music (e.g., from SoundtrackYourBrand) but never plays the spoken audio. Interestingly, when I play the audio without enabling audio ducking, it seems to work 100% of the time from my limited testing, even in the background. The app has background modes enabled for Audio, Background Fetch, and Remote Notifications. Best Approach to Achieve This? I’d like guidance on the best Apple-compliant approach to reliably play audio on command from the server, even when the app is in the background. Some possible paths: Ensuring the app remains active in the background – Are there recommended ways to prevent the app from getting suspended, such as background tasks, a special background mode, or a persistent connection to the server? Alternative triggering mechanisms – Would something like VoIP, Push-to-Talk, or another background service be better suited for this use case? Built-in iOS speech synthesis (AVSpeechSynthesizer) – If playing external audio is unreliable, would generating speech dynamically from text be a more robust approach? Streaming audio instead of sending a URL – Could continuous streaming from the server keep the app active and allow playback at the right moment? I want to ensure the solution is reliable and works 100% of the time when needed. Any recommendations on the best approach for this would be greatly appreciated. Thank you for your time and guidance.
0
0
165
1w
Remotely dismissing notifications on iOS
I am sending push notifications on iOS, and I can receive and display them correctly. I want to be able to dismiss notifications that have been read server-side (e.g. on a different device) so I am trying to send a custom notification payload alongside a badge counter update, that specifies what notification IDs to remove. I then use removeDeliveredNotifications on the IDs I get. However, it doesn't seem to be working. I am setting the identifier using the apns-collapse-id header and I do see that reflected on the device side. Any ideas what I might be doing wrong? This is how I'm handling push notifications: func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void ) { let customPayload = notification.request.content.userInfo if let dismissedNotifications = customPayload["dismissed_notifications"] as? [String] { center.removeDeliveredNotifications(withIdentifiers: dismissedNotifications) } completionHandler([.banner, .sound, .badge]) } I also tried doing the same thing inside func userNotificationCenter( _ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void ) Thank you!
3
0
256
1w
Timezone for Device Notification statistics?
What timezone is used in the CloudKit Push Notification reporting? Meaning, when I see 1,000 Sent Push Notifications on 2/18, is that 2025-02-18 00:00 through 2025-02-18 23:59 PST? EST? UTC? The metrics shown in [the CloudKit Push Notification reporting] are not lining up with stats from my marketing system, and I'm trying to diagnose. Also, is there a way to see DELIVERIES or just SENT? I'm looking to learn more about why a Notification would be Sent but not received by the user. Thank you!
2
0
237
1w
Clarification Needed on Apple Push Notification Service Server Certificate Update Requirements for Token-Based vs. Certificate-Based Authentication
Hello Apple Developer Team, Based on the mandate to update the APNs certificate by February 24, 2025 for certificate-based authentication, a question from the team has been brought up that maybe Apple or the community can help answer. Since our implementation uses token-based authentication, I’m seeking clarification on a couple of points: 1. Does the certificate update affect token-based connections at all? 2. What is the rationale behind updating certificates for certificate-based authentication, and are there any implications or benefits for developers using token-based authentication? Understanding these details will help us ensure our system remains compliant and optimally configured. Any guidance or further clarification you can provide would be greatly appreciated. Thank you!
2
0
357
1w
Cannot export p12 certificate
I have a pass type id that expired. I created a CSR in keychain access on my Mac. I uploaded the CSR and generated a new cert. I downloaded the new cert and imported into keychain access. I don't see the associated private key and I cannot export a .p12 certificate. It's possible I started with the wrong key to generate the CSR or maybe I inadvertently deleted key while trying to locate the cert after importing. I'm not sure how to determine which. I do still have the private key from the cert that expired. But, I cannot figure out how to sign a cert again, my only option now is download. I've been searching the forum and while there may be an answer, I may just be looking for the wrong thing. I could use some help if anybody would be so kind.
1
0
200
3d
SHA-2 Root: USERTrust RSA Certification Authority certificate.
Got notification to update this certificate - there was a link to Sectigo.com where I found an attachment with that name - when I clicked it I got a box where it said to install it. Clicked the box and it was saved somewhere on my computer. Now I dont know if that's it or I need to take further actions - please help :-) Have no experience with this - my collegue who did this has stopped. Hoping for a simple answer :-) P
3
0
316
1w
About APNS certificate replacement
I received an email from Apple saying that I needed to replace the APNS certificate. I am inquiring because I am curious about who has the relevant authority and who actually makes the changes. Could you please provide specific guidance on this? Hello, We’re reaching out with a final reminder that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs updated the server certificates in sandbox on January 21, 2025. APNs production server certificates will be updated on February 24, 2025. To continue using APNs without interruption, you’ll need to update your application’s Trust Store to include the new server certificate: SHA-2 Root: USERTrust RSA Certification Authority certificate. To ensure a smooth transition and avoid push notification delivery failures, please make sure that both old and new server certificates are included in the Trust Store before the cut-off date for each of your application servers that connect to sandbox and production. At this time, you don’t need to update the APNs SSL provider certificates issued to you by Apple. If you have any questions, please contact us. The Apple Developer Relations Team
3
0
541
1w
Action Required: Apple Push Notification Service Server Certificate Update
Hi, We received the following message. Hello, We’re reaching out with a final reminder that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs updated the server certificates in sandbox on January 21, 2025. APNs production server certificates will be updated on February 24, 2025. To continue using APNs without interruption, you’ll need to update your application’s Trust Store to include the new server certificate: SHA-2 Root: USERTrust RSA Certification Authority certificate. Note, that we are using Firebase to deliver push notifications and the connection is done via APN keys, not certificates. Is there anything that we need to update in the application to mitigate the risk of not delivered push notes ?
2
0
941
2w
Push notifications to api.push.apple.com sometimes fail
We have a case when we send 8 push notifications more or less simultaneously over 1 HTTP 2.0 connection. Using .NET Core 8 Sometimes some of them fail with a strange message: System.Net.Http.HttpRequestException: The response ended prematurely while waiting for the next frame from the server. (ResponseEnded) ---> System.Net.Http.HttpIOException: The response ended prematurely while waiting for the next frame from the server. (ResponseEnded) at System.Net.Http.Http2Connection.ThrowRequestAborted(Exception innerException) at System.Net.Http.Http2Connection.Http2Stream.TryEnsureHeaders() at System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync(CancellationToken cancellationToken) at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.HttpClientLoggerHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) We noticed that failure is always accompanied with a huge delay (~500ms) comparing to success (~20ms). Also some of the burst messages are sent successfully (sometimes 2-4 of them) What can we do about it?
2
0
278
1w