Notifications

RSS for tag

Learn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.

Notifications Documentation

Posts under Notifications subtopic

Post

Replies

Boosts

Views

Activity

Notification Service Extension and the main thread
Question, if I am writing async code in the notification service extension, I understand it terminates after 30 seconds. If I want to wait until these async methods finish before calling the content handler, I believe an option I have is to use dispatch groups. However I am open to other solutions if there are better options. My question is, if I use dispatch groups, is there any issue in using the main queue here? Or does the main thread not make sense to use in the context of the NSE? dispatch_group_notify(group, dispatch_get_main_queue(), ^{ if (self.contentHandler) { self.contentHandler(self.bestAttemptContent); } }); Or is it recommended to instead use a different queue in the NSE? dispatch_queue_t nseQueue = dispatch_queue_create("com.blah.blah.nse.queue", DISPATCH_QUEUE_SERIAL); dispatch_group_notify(group, dispatch_get_global_queue(QOS_CLASS_(SOMETHING), 0), ^{ ... }); OR am I over thinking this? :) Thanks ahead of time, relatively new to iOS so just looking to learn/understand better.
3
1
258
Jun ’25
APNs Returning 200 OK for Uninstalled Apps
We're experiencing an issue with Apple Push Notification service where APNs continues to return 200 OK responses for device tokens belonging to uninstalled applications. Issue Details: When sending push notifications to device tokens, APNs returns 200 OK responses even for devices where our app was uninstalled more than a month ago Thanks in advanced for support
3
1
141
Jul ’25
Regarding the change of device tokens after an iOS update
In the app we are developing, we update the device token upon app launch using didRegisterForRemoteNotificationsWithDeviceToken. Previously, after an iOS major update, if the app was left without being launched, users experienced an issue where notifications would not be received. Later, we confirmed that running didRegisterForRemoteNotificationsWithDeviceToken during app launch updates the device token and restores the ability to receive notifications. Therefore, we believe that the device token may change due to an iOS major update. We want to understand the detailed conditions under which the device token is updated due to an iOS update: Does the same issue occur after iOS minor updates as well? Does it always happen during iOS major updates? We reviewed the official documentation, but there was no detailed description of the device token update conditions. Additionally, we contacted Apple, but received no clear answers. If anyone has experienced the same situation, we would appreciate any information you can share.
2
0
135
Jun ’25
Apple 推送通知服务如何更新证书
“Apple 推送通知服务的服务器证书更新 2024 年 10 月 17 日 Apple 推送通知服务 (APNs) 的证书颁发机构 (CA) 即将改变。APNs 将于 2025 年 1 月 20 日更新沙盒环境的服务器证书,并于 2025 年 2 月 24 日更新生产环境的服务器证书。” 关于这个邮件,请问我应该怎么做,才能把下载的crt证书加到trust store上
1
1
801
Dec ’24
AlarmKit plays system error tone instead of custom sound files (iOS 26.0)
AlarmKit custom sounds are universally broken in iOS 26.0 stable - instead of playing your custom sound, it plays a system error/timeout beep. I've spent days investigating why custom sounds result in what sounds like an error beep (like when you cancel an operation or hit a timeout) instead of the actual audio file. I can now prove this is an Apple bug, not implementation error. Evidence: Test 1: My Implementation Followed Apple's documentation exactly Tried both bundle and Library/Sounds (as documented) Result: System error beep (not my audio) Test 2: Professional Apps Tested ADHDAlarms (popular AlarmKit example by jacobsapps) https://github.com/jacobsapps/ADHDAlarms Their airhorn.mp3 custom sound: same error beep (not an airhorn) Their default sound: works perfectly Test 3: Device Testing Physical iPhone (iOS 26.0 - 23A341): broken iOS Simulator: broken Not device-specific Files are found correctly, but the actual audio file is never played. Instead, you hear what sounds like a system error/cancellation tone. What I've Eliminated Not a Library/Sounds vs Bundle issue (both broken) Not a file format issue (.mp3, .caf, .m4a all broken) Not an implementation issue (professional apps broken too) Not a device issue (simulator and device both broken) Not a file size issue (5KB to 2MB all broken) The Documentation Lie: Apple's docs for AlertConfiguration.AlertSound.named(_:) state: "Choose a file that's in your app's main bundle or the Library/Sounds folder" https://developer.apple.com/documentation/activitykit/alertconfiguration/alertsound/named(_:) Both locations are broken. Tested on: iOS 26.0 (23A341), Xcode 26.0.1, Swift 6.2 Impact: This affects any app trying to: Provide personalized wake-up sounds Use custom alarm tones Create meditation/sleep apps Differentiate from default iOS alarms Current Status: Multiple bug reports filed: FB19900024, FB18237648, FB19779004 Apple engineer claimed "fixed in latest beta" in August Still broken in iOS 26.0 stable (September) Workaround: None that I know of. You must use .default sound. For apps needing custom audio, play it with AVAudioPlayer after the alarm fires and user opens the app. Question: Has ANYONE gotten custom AlarmKit sounds working in iOS 26.0 stable? If so, plzzz help I'd be so grateful.
2
1
113
Oct ’25
App notifications are failing to trigger
Facing issue while sending push notification through the application. The APNs certificate is valid. Below is the error log. System.AggregateException: One or more errors occurred. ---> PushSharp.Apple.ApnsNotificationException: Apns notification error: 'ConnectionError' ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.Security._SslStream.EndWrite(IAsyncResult asyncResult) at System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult) at System.IO.Stream.<>c.b__53_1(Stream stream, IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncTrimPromise1.Complete(TInstance thisRef, Func3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at PushSharp.Apple.ApnsConnection.<SendBatch>d__21.MoveNext() --- End of inner exception stack trace --- at PushSharp.Apple.ApnsServiceConnection.<Send>d__2.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) PushSharp.Apple.ApnsNotificationException: Apns notification error: 'ConnectionError' ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult) at System.Net.Sockets.NetworkStream.EndWrite(IAsyncResult asyncResult) --- End of inner exception stack trace --- at System.Net.Security._SslStream.EndWrite(IAsyncResult asyncResult) at System.Net.Security.SslStream.EndWrite(IAsyncResult asyncResult) at System.IO.Stream.<>c.<BeginEndWriteAsync>b__53_1(Stream stream, IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncTrimPromise1.Complete(TInstance thisRef, Func3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at PushSharp.Apple.ApnsConnection.d__21.MoveNext() --- End of inner exception stack trace --- at PushSharp.Apple.ApnsServiceConnection.d__2.MoveNext()<---
1
1
150
May ’25
Clarification on APNs MDM Push Certificate per-customer requirement for MSP/multi-tenant MDM
Hello Apple Developer Community, We’re building an MDM product (SaaS, multi-tenant). I’d like clarification on the APNs MDM push certificate usage model for service providers (MSPs). Question: Is it acceptable for an MDM vendor to use a single APNs MDM push certificate owned by the vendor to manage devices for multiple, independent customer organizations? Or is it required/recommended that each customer (company) must obtain and use its own APNs MDM push certificate (issued under the customer’s Apple ID) for their tenant? Why we’re asking: We understand that many guides show the process where each customer logs into the Apple Push Certificates Portal with their own Apple ID, uploads a CSR provided by the MDM, and then renews yearly. Practically, for a small team and early-stage deployments, using one vendor-owned certificate across multiple tenants would be simpler. We want to ensure we’re not violating any policy, terms, or technical requirements (e.g., certificate ownership, topic binding, device token isolation, audit/compliance expectations). What we need from Apple (or authoritative sources): An official Apple document or policy that clearly states whether per-customer certificates are mandatory vs strongly recommended for MSP/multi-tenant MDMs. If per-customer is mandatory, please point to the relevant clause or section. If a vendor uses a single certificate for multiple organizations, what risks or consequences should we expect (e.g., compliance issues, supportability, potential program violations, off-boarding problems, etc.)? Context: We’re sending only MDM wake notifications (standard MDM flow). We understand certificates expire yearly and must be renewed with the same Apple ID to avoid device re-enrollment. We want to follow Apple’s best practices while keeping early operations manageable. Any guidance, links to official documentation, or clarification from Apple engineers/moderators would be greatly appreciated. Thank you!
1
0
104
Oct ’25
invalid_client when invoking https://appleid.apple.com/auth/token
sending the following POST request: ---- HTTP REQUEST ---- POST https://appleid.apple.com/auth/token Headers: Content-Type: application/x-www-form-urlencoded Body: client_id=au.com.thejlrguy.businesschat&client_secret=eyJhbGciOiJFUzI1NiIsImtpZCI6IktLUDc4MkhGVTcifQ.eyJ...QeDn7ug&grant_type=client_credentials&scope=https%3A%2F%2Fappleid.apple.com Getting the below error: {"error":"invalid_client"} The private key used to sign the JWT was created 24 hours ago.
0
1
77
May ’25
iOS 18.2 Heavy Delays in Notifications with AI enabled
I am experiencing heavy delays with any push notification if I have AI enabled. Authenticator takes minutes to show up, the app for the doorbell that, needless to say, requires a real-time notification, fails to deliver push notifications in time. I have had to turn off AI in order to have a functioning phone... (I'm on a 16 Pro) Any resolution on this? Thanks
2
1
870
Dec ’24
Push Notification Gets Removed From Notification Screen When Setting "badge" to 0
Push message on the lock-screen disappears in one specific instance. In general the situation is as follows: the application, upon starting up, sets the badge counter (i.e. notificationCenter.setBadgeCount(3)) the application is being sent to background the screen is locked (it doesn't matter if it's turned on or not) send a push message to the application and set the badge (in aps) to "0" What happens: the screen lights up (unless it's lit up already), the push is being displayed for a very short time and gets hidden. Happens on iOS 18.1, 18.1.1, 18.2. If not setting badge in the aps keys it works correctly. I've created a feedback report https://feedbackassistant.apple.com/feedback/16095572. I am able to reproduce the issue on a sample app 100% of the time :/
3
1
616
Oct ’25
Missing INITIAL_BUY notification for a single user (App Store Server Notification V2)
Hi all, We’re implementing in-app subscriptions in our iOS app using App Store Server Notifications V2 in the production environment. Everything is generally working well — we receive notifications such as DID_CHANGE_RENEWAL_STATUS, CANCELLATION, etc., and we log all incoming notifications into our own database. However, we've encountered a single case where the INITIAL_BUY notification was not received for a specific user. Interestingly, we did receive the later notifications (DID_CHANGE_RENEWAL_STATUS and CANCELLATION) for that same user. Here is our setup: App Store Server Notifications V2 Notification endpoint is stable and functioning normally (receives and logs other notifications) Notifications are reliably stored in our database The issue occurred only once for one user Environment: Production We've already contacted Apple Developer Support, but were informed that this issue is out of scope for direct support, and were directed to the Developer Forums. Our questions: Under what conditions might the INITIAL_BUY notification fail to be sent or delivered? Is there any known behavior or scenario where Apple may skip the INITIAL_BUY notification? Any recommendations on how to further investigate or verify whether it was sent from Apple’s side? We’ve confirmed that the notification never hit our server (no logs, no DB record), and our system was healthy at the time. Any insight would be greatly appreciated. Thank you!
2
0
83
Sep ’25
Notifications False Sucecss Delivery
We operate a social network application, SportsYou with over 3 million monthly active users and are experiencing significant issues with push notification delivery through APNs. We have a large number of users reporting they are not receiving push notifications. Our infrastructure uses AWS SNS integrated with APNs to deliver notifications. However, AWS CloudWatch consistently reports successful delivery (Success response), even though users confirm they never received the notifications. Because we receive success responses from AWS SNS, our system does not attempt to recreate or refresh the device endpoints. This leaves us unable to detect or recover from these delivery failures automatically. This issue is widespread and inconsistent. It affects users across multiple variables including different iOS versions, different device models, and different versions of our application. We cannot identify a clear pattern that would help us isolate the root cause. With millions of active users, even a small percentage of delivery failures represents thousands of users experiencing a degraded service. This is significantly impacting user engagement and satisfaction. We need guidance on how to properly diagnose this issue and ensure reliable notification delivery to our users. Specifically, we'd like to understand why we're receiving success responses when notifications aren't being delivered, and what steps we can take to detect and prevent these failures.
2
1
111
Oct ’25
Push Notification Problem
Hello, i'm facing issues, when trying to integrate push notification feature into my app. the following message is shown and I don't know how to fix it: ExportArchive "Runner.app" requires a provisioning profile with the push notifications feature (Encountered error while creating the IPA) Thankful for any help! Best regards
1
1
290
Mar ’25
Email VIP Alerts on iPhone Lock Screen
From iPhone iOS 18.3 , 18.3.1, and 18.4 Dev2, VIP Mail alerts will not wake a phone display to notify of a new mail received for a VIP contact. The phone will sound an audible tone indicating the mail was received, and if you manually wake the screen by tapping and then dragging upward to show notifications you will then see the VIP mail alert. However if the screen is sleeping, it will not light up or wake to indicate or display the new mail. The problem was briefly resolved in 18.4 Dev1, but problem returns in Dev2. We see this across all iPhone 16 Pros and iPhone SE2 with iOS 18.3 or higher. Is this something acknowledged by Apple as on track for resolution in iOS 18.4 Final Release? Thank you.
3
1
467
Mar ’25
Notification coordination between iOS and watchOS is not working properly
Notification coordination between iOS and watchOS is not working properly watchOS and iOS try to coordinate between phone and watch notifications. The concept here is that if there is a main app and a companion app, they could both be sending a notification, then the notification would alert on both, which is a deviation from how notification mirroring is handled if there is an iOS app but no watch app. The watch waits for the iOS notification to fire so they can determine if this is the same notification that needs to be deduped, displayed on one device but not the other, or separate notifications to be displayed both. If there is no notification on the phone, the watch will timeout after 13 seconds and alert anyway. If you have an iOS companion app, the best solution to this is to send the same notification on both devices simultaneously, and ensuring the UNNotificationRequest.identifier matches on both notifications. This will let the systems determine how to handle the notification correctly and quickly, and the notification will alert right away. https://developer.apple.com/forums/thread/765669 According to the above article, "when a notification arrives on watchOS alone first, it coordinates with iOS," but in reality, it doesn't work properly. Detailed process of this phenomenon watchOS receives a notification. On watchOS, the notification is not immediately shown to the user. iOS receives a notification with the same UNNotificationRequest.identifier as in (1). The notification in (3) does not appear on either iOS or watchOS. However, the notification from (3) does appear in iOS Notification Center. Thirteen seconds after watchOS received the notification, the notification from (1) is shown to the user on watchOS. In the end, the iOS and watchOS notifications are not consolidated and each remains in its respective notification center. Up to (3) there are no issues. Starting with (4), both iOS and watchOS exhibit a lot of odd behavior. This phenomenon occurs with both local notifications and push notifications. When iOS receives the notification first, there is no problem. The notification for watch received later is processed appropriately, and the watchOS notification is not additionally displayed to the user. Expected proper process Same as above. Same as above. Same as above. The notification in (1) is integrated into the notification in (3). The notification in (3) is alerted to the user immediately. 2 sample projects to reproduce Only the main code is attached. Sample project1: local notifications Swift code for local notification app (iOS, watchOS) - App.swift.txt Sample project2: push notifications This sample project is implemented using Firebase Functions and Firebase Cloud Messaging. Swift code push notification app (iOS, watchOS) - App.swift.txt Server side JavaScript code for FirebaseFunction - index.js.txt Tested devices and OS This phenomenon occurred in both of the following patterns. Pattern 1 Xcode 26.0 iPhone 16 (iOS 26.0) Apple Watch series 10 (watchOS 26.0) Pattern 2 Xcode 16.4 iPhone 11 (iOS 18.6) Apple Watch SE 2nd gen (watchOS 11.6) Question Is this phenomenon a bug? Or is my understanding or implementation incorrect? Feedback Assistant number FB20339772
1
0
124
Sep ’25
Delay in notifications iPhone 16 Pro iOS 18.3
Hi, I’m having issues with push notifications on my phone across multiple apps. When someone sends me a message, I only receive the notification 10 to 15 minutes later. For example, on WhatsApp, people say that my chat only shows one checkmark when they send me a message. I don’t know what else to do. I’ve already contacted Apple Support, visited an Apple-affiliated physical store, and followed all the recommended procedures. This is my first time using an iPhone—I bought it for professional use, but it’s practically useless if I don’t receive notifications instantly. They even told me that if I send it in for warranty service, there’s a 90% chance they won’t detect the issue, and the iPhone will come back with the same problem.
1
1
621
Feb ’25
Action Required: Apple Push Notification Service Server Certificate Update
On December 6, 2024, I received the following email. Does this mean that there is something that needs to be done on the app side or on the Firebase side? Currently, in our project, we are using Firebase to set up push notifications. If anyone knows how to deal with this or has taken any action, could you tell me what specific steps you took? Action Required: Apple Push Notification Service Server Certificate Update As we announced in October, the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs will update the server certificates in sandbox on January 20, 2025, and in production 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.
2
1
4k
Jan ’25
Timestamp with 410 error code
Docs mention the following about the timestamp field returned by APNs: "The time, represented in milliseconds since Epoch, at which APNs confirmed the token was no longer valid for the topic. This key is included only when the error in the :status field is 410." We would like to clarify whether this timestamp is subject to the fuzzy schedule or whether it represent the accurate time of when APNs knew that the token became invalid? We understand that using 410 for tracking purposes is off label. However we still would like to have the most accurate information in regards to when token became invalid. This will help us debug user issues better in cases when they re-install, uninstall, change permission settings, etc.
1
1
146
Aug ’25