Hi, I'm experiencing an issue with my app. I use Firebase as my server, and it is great. Still, there is one issue: when I send push notifications from my app to users, the users will get the notification if the app is open, but not when it is closed. I have tried many solutions to fix it, even asking AI, but the issue is still there. I would be happy to give you access to Firebase and the Xcode workspace, as I have no clue how to fix it.
Notifications
RSS for tagLearn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
We recently updated our app icon, but the push notification icon has not been updated on some devices. It still shows the old icon on:
• iPhone 16 Pro — iOS 26
• iPhone 14 — iOS 26
• iPad Pro 11” (M4) — iOS 18.6.2
• iPhone 16 Plus — iOS 18.5
After restarting these devices, the push notification icon is refreshed and displays the new version correctly.
Could you advise how we can ensure the push notification icon updates properly on all affected devices without requiring users to restart?
Thank you.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Developer Tools
iOS
User Notifications
I have used the Push Notifications Console and verify that the test notification reaches my device (it says "not necessarily the app"). However, GameCenter notifications are not reaching the app. When one device passes the turn, the turn is successfully passed as seen in the Matchmaker VC. However, the app does not get the turn pass notification whether or not it is running. No banner appears if the app is not running (but it does when using the Push Notifications Console).
Please advise.
Topic:
App & System Services
SubTopic:
Notifications
I am using UNCalendarNotificationTrigger and from my initial tests with simulator and timezone changes in my mac i see that notification donot get triggered at specific times if timezone changes, is this expected behaviour ?
Topic:
App & System Services
SubTopic:
Notifications
Hello guys,
i need a little help. Im building an alarm clock app, pretty good one, and i have my own sounds i want to use as the alarm ring but notifications on apple cant work when the phone is turned off or the device is in silent mode (Or at least thats how i understand it) unless they have this feature called critical alerts that lets you have notifications even when the phone is turned off or silented. Without this, the phone can do just one beep and only when you open the notification, then it starts ringing but how is this supposed to wake you up? Alarmy has this worked out fine and i cant figure out how, maybe someone here knows. Im thinking maybe they have the critical alerts enabled but then i dont know why Apple would approve theirs and not mine. I tried to submit for the critical alerts feature but apple didn’t approve it saying the app is not the use case and im kinda lost. The whole app could be ruined because of this. So my question is. is there any way how i can use my custom sounds as a notifications on ios even if the phone is turned off or in silent mode+turned off and the app is not straight up running without being approved for critical alerts? Somehow like alarmy does it but i dont know if they have the critical alerts or not.
Thank you very much for any kind of help 🙏. For everyone whos reading this, take care!
Topic:
App & System Services
SubTopic:
Notifications
手机型号:iPhone 13 Pro
iOS版本号:iOS 18.6.2 (22G100)
用户开启了应用的系统通知功能,在收到离线推送后应用右上角展示未读消息数。在APP启动或者从后台恢复的时候,应用会用如下方法清理应用桌面图标的未读数角标。但是在部分机型上,应用转为“后台模式”时仍然会出现一个未读角标,且每次都是一个固定值;如果直接kill进程就不会出现未读角标。请问如何能够【完全】清理消息未读数,确保不会在退后台的时候再次出现呢?
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[[UIApplication sharedApplication] cancelAllLocalNotifications];
if (@available(iOS 16.0, *)) {
[[UNUserNotificationCenter currentNotificationCenter] setBadgeCount:0 withCompletionHandler:nil];
[[UNUserNotificationCenter currentNotificationCenter] removeAllPendingNotificationRequests];
[[UNUserNotificationCenter currentNotificationCenter] removeAllPendingNotificationRequests];
}
UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
content.badge = @(-1);
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"clearBadge"
content:content
trigger:nil];
[[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request
withCompletionHandler:^(NSError * _Nullable error) {
// Do nothing
}];
Topic:
App & System Services
SubTopic:
Notifications
I have been fighting this problem for two months and would love any help, advice or tips. Should I file a DTS ticket?
Summary
We attach a JPEG image to a local notification using UNNotificationAttachment. iOS reports the delivered notification as having attachments=1, but intermittently no image preview appears in Notification Center. In correlated cases, the attachment’s UNNotificationAttachment.url (which points into iOS’s attachment store) becomes unreadable (Data(contentsOf:) fails) even though the delivered notification still reports attachments=1.
This document describes the investigation, evidence, and mitigations attempted.
Product / Component
UserNotifications framework
UNNotificationAttachment rendering in Notification UI (Notification Center / banner / expanded preview)
Environment
App: OnThisDay (SwiftUI, Swift 6)
Notifications: local notifications scheduled with UNCalendarNotificationTrigger(repeats: false)
Attachment: JPEG generated from PhotoKit (PHImageManager.requestImage) and written to app temp directory, then passed into UNNotificationAttachment.
Test contexts:
Debug builds (direct Xcode install)
TestFlight builds (production signing)
iOS devices: multiple, reproducible with long runs and user clearing delivered notifications
Expected Result
Delivered notifications with UNNotificationAttachment should consistently show the image preview in Notification Center (thumbnail and expanded preview), as long as the notification reports attachments=1.
If the OS reports attachments=1, the attachment’s store URL should remain valid/readable for the lifetime of the delivered notification still present in Notification Center.
Actual Result
Intermittently:
Notification Center shows no image preview even though the app scheduled the notification with an attachment and iOS reports the delivered notification as having attachments=1.
When we inspect delivered notifications via UNUserNotificationCenter.getDeliveredNotifications, the delivered notification’s request.content.attachments.first?.url exists but is unreadable (attempting Data(contentsOf:) returns nil / throws), i.e. the backing attachment-store file appears missing or inaccessible.
In some scenarios the attachment-store file is readable for hours while the notification is pending, and then becomes unreadable after the notification is delivered.
Reproduction Scenarios (Observed)
Next-day reminders show attachment-store unreadable after delivery
1. Schedule a one-shot daily reminder for next day (07:00 local time) with UNCalendarNotificationTrigger(repeats: false) and a JPEG attachment.
2. During the prior day, periodic background refresh tasks verify the pending notification’s attachment-store URL is readable (pendingReadable=true).
3. After the reminder is delivered the next morning, the delivered snapshot shows the delivered notification’s attachment-store URL is unreadable (readable=false) and Notification Center shows no preview.
Interpretation: the attachment-store blob appears to become inaccessible around/after delivery, despite being readable while pending.
Evidence and Instrumentation
We added non-crashing diagnostic logging (Debug builds) around:
Scheduling time
Logged that we successfully created a UNNotificationAttachment from a unique temp file.
Logged that UNUserNotificationCenter.add(request) succeeded.
Queried pendingNotificationRequests() and logged the scheduled request’s attachment url.lastPathComponent (iOS attachment-store filename).
Delivered time (when app becomes active)
Called UNUserNotificationCenter.getDeliveredNotifications and logged:
delivered count, attachment count
attachment url.lastPathComponent
whether Data(contentsOf: attachment.url) succeeds (readable=true/false)
Content fingerprinting
Fingerprinted the exact JPEG bytes we wrote (SHA-256 prefix + byte count).
Logged the iOS attachment-store filename (url.lastPathComponent) returned post-scheduling.
Decode validation probe (later addition)
When Data(contentsOf:) succeeds, we validate it decodes as an image using CGImageSourceCreateWithData and log:
UTI (e.g. public.jpeg)
pixel width/height
magic header bytes
What we tried / Mitigations
Proactive “self-heal” for pending notifications
Change: during background refresh/foreground refresh, verify the pending daily reminder’s attachment-store URL readability. If it’s unreadable, reschedule with a new attachment (same trigger).
Rationale: if iOS drops the store file before delivery, recreating could repair it.
Result: We observed cases where pending remained readable but delivered became unreadable after delivery, so this doesn’t address all observed failures. It is still valuable hardening.
Increase scheduling frequency / reschedule closer to fire time (proposed/considered)
We discussed adding a debug mode to always recreate the daily reminder during background refresh tasks (or only within N hours of fire time) to reduce the time window between attachment creation and delivery.
Status: experimental; not yet confirmed to resolve the “pendingReadable=true → delivered unreadable after delivery” failure.
Impact
The primary UX value of the daily reminder is the preview photo; missing previews degrade core functionality.
Failures are intermittent and appear dependent on OS attachment-store behavior and Notification Center actions (clearing notifications), making them difficult to mitigate fully app-side.
Notes / Questions for Apple
1. Is iOS allowed to coalesce/deduplicate UNNotificationAttachment storage across notifications? If so, what is the retention model when delivered notifications are removed?
2. If a delivered notification still reports attachments=1, should its attachment-store URL remain valid/readable while the notification is still present in Notification Center?
3. In “next-day” one-shot scheduling scenarios, can the attachment-store blob be purged between scheduling and delivery (or immediately after delivery) even if the notification remains visible?
4. Is there a recommended pattern to ensure attachment previews remain stable for long-lived scheduled notifications (hours to a day), especially when using UNCalendarNotificationTrigger(repeats: false)?
Minimal Code Pattern (simplified)
1. Generate JPEG (PhotoKit → UIImage → JPEG Data).
2. Write to a unique temp URL.
3. Create attachment:
UNNotificationAttachment(identifier: <uuid>, url: <tempURL>, options: [UNNotificationAttachmentOptionsTypeHintKey: "public.jpeg"])
4. Schedule notification with a calendar trigger for the next morning.
Topic:
App & System Services
SubTopic:
Notifications
Scenario:
User is actively subscribed to Monthly Package
From the Device App (Manage Subscriptions), user upgrades to Yearly Package
Purchase completes successfully on device
Issue: Do not receive any server notification for this action
Month Package Purchase Date: 2025-11-11 19:06:45.537 +0600 Month to Yearly Upgradation Date: 2025-12-11 paymentReferenceId: 510002270528780
Topic:
App & System Services
SubTopic:
Notifications
Tags:
App Store Server Notifications
Apple Pay
App Store Server API
We have an app in Swift that uses push notifications. It has a deployment target of iOS 15.0
I originally audited our app for iOS 26 by building it with Xcode 26 beta 3. At that point, all was well. Our implementation of application:didRegisterForRemoteNotificationsWithDeviceToken was called.
But when rebuilding the app with beta 4, 5 and now 6, that function is no longer being called.
I created a simple test case by creating a default iOS app project, then performing these additional steps:
Set bundle ID to our app's ID
Add the Push Notifications capability
Add in application:didRegisterForRemoteNotificationsWithDeviceToken: with a print("HERE") just to set a breakpoint.
Added the following code inside application:didFinishLaunchingWithOptions: along with setting a breakpoint on the registerForRemoteNotifications line:
UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound]) { granted, _ in
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
}
Building and running with Xcode 26 beta 6 (17A5305f) generates these two different outcomes based upon the OS running in the Simulator:
iPhone 16 Pro simulator running iOS 18.4 - both breakpoints are reached
iPhone 16 Pro simulator running iOS 26 - only the breakpoint on UIApplication.shared.registerForRemoteNotifications is reached.
Assuming this is a bug in iOS 26. Or, is there something additional we now need to do to get push notifications working?
Hi,
We have a simple calendar reminder app that uses UNNotificationRequest to schedule local notifications for user events.
I’m wondering whether UNNotificationRequest has a system-imposed limit of 64 upcoming scheduled notifications, similar to the deprecated UILocalNotification.
We’re asking because one of our users is not receiving recently scheduled reminders.
Our current workflow is:
We schedule notifications on app launch and when the app is about to quit.
Before scheduling, we call removeAllPendingNotificationRequests().
We then fetch the 64 nearest upcoming events and schedule them using
UNUserNotificationCenter.current().add(...).
This approach works fine during our testing, but we’re unsure what might be causing the issue for some users.
Any insights would be appreciated. Thanks!
Approx Dec 13th 2025 til now (Dec 29th) I noticed my APNS dropped off to nothing daily. When I try to send APNS alerts on the developer site tool it always returns "discarded as device was offline" for multiple devices which I know are online.
When I try pushing through my VPS (as I always have without any code changes for months) I get status codes of 400 and 403 mostly and a few 200's without it delivering also.
I created a new sandbox certificate just in case it was that but still no luck, I get the same results. Ive checked for any firewall issues and I see the following on my VPS:
nslookup gateway.push.apple.com
Server: 1.1.1.1
Address: 1.1.1.1#53
** server can't find gateway.push.apple.com: NXDOMAIN
This seems like a second issue but not the primary issue that the portal is reporting.
Any ideas what to check? Im at a loss as to why its not working at all through apples test notification portal on my developer account. It seems thats the initial issue I need to solve.
Thank you for any ideas/help
We’re sending PTT notifications from our server and are receiving HTTP 403 from APNs for certain phones with the reason field BadEnvironmentKeyInToken. I can’t find this reason documented in Apple’s public error list. I’d like to confirm what this error specifically means and how to resolve it. Any guidance or clarification would be greatly appreciated. Thank you. Here is the document I was referring to. https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html
Topic:
App & System Services
SubTopic:
Notifications
I am currently testing the Declared Age Range / Parental Consent flow in the Sandbox environment, and I am experiencing an issue where the RESCIND_CONSENT App Store Server Notification is not being delivered to my server.
🔍 Test Environment
iOS version: iOS 26.2 (Sandbox environment)
App Store Server Notifications: Sandbox environment
🔄 Test Scenario
App Settings > Developer > Sign in with a Sandbox account
Launch the app
In App Settings > Developer > Sandbox Account > Management > Revoke App Consent,
enter the app’s Bundle ID, tap the Revoke Consent button,
and confirm that the revocation completion popup message is displayed
Check whether App Store Server Notifications are received by the server
Confirm that the RESCIND_CONSENT notification is not received by the server
✅ Expected Result
The App Store Server sends a RESCIND_CONSENT notification to the Sandbox endpoint
The notification payload includes appTransactionId
The server can block app access based on the corresponding appTransactionId
❌ Actual Result
No RESCIND_CONSENT notification is received in the Sandbox environment
❓ Questions
Is this behavior an intended limitation of the Sandbox environment,
or is it a known issue or bug?
Is it possible that RESCIND_CONSENT notifications will only be delivered starting January 1, 2026?
Additionally, when a RESCIND_CONSENT server notification is received,
I currently update my database with the appTransactionId and the registration date.
When a minor attempts to access the app, I check the latest appTransactionId status,
and if the most recent state indicates consent has been revoked,
I block app access and prompt the user to request parental consent again using PermissionKit.
Currently, I have implemented local cache update with server data when app is killed using Push Notification and Notification Service Extension. So it works even the app is killed by the user, but I wanted to know whether this is app review safe work around or not as I am not finding any documentation for this.
Hello,
I recently had an unusual experience, and I’m wondering if this is related to Apple’s policies, so I wanted to ask.
While a call is in Picture-in-Picture (PIP) mode, notification pushes from the same app do not appear.
The API is being triggered, but the notification banner does not show on the device.
Once PIP is closed, the notifications start appearing normally again.
Is this behavior enforced by Apple’s policies?
What’s interesting is that banners from other apps do appear — only the banners from the app currently in PIP are not shown.
In macOS, how can I use UnmutableNotificationContent notifications to prevent the main window from activating when clicking the notification?
code:
import Cocoa
import UserNotifications // Mandatory import for notification functionality
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Automatically request permissions and send a test notification when the view loads
sendLocalNotification()
}
/// Core method to send a local notification
func sendLocalNotification() {
let notificationCenter = UNUserNotificationCenter.current()
// 1. Request notification permissions (Mandatory step; user approval required)
notificationCenter.requestAuthorization(options: [.alert, .sound, .badge]) { [weak self] isGranted, error in
guard let self = self else { return }
// Handle permission request errors
if let error = error {
print("Permission request failed: \(error.localizedDescription)")
return
}
// Exit if user denies permission
if !isGranted {
print("User denied notification permissions; cannot send notifications")
return
}
// 2. Construct notification content using UNMutableNotificationContent
let notificationContent = UNMutableNotificationContent()
notificationContent.title = "Swift Notification Test" // Notification title
notificationContent.subtitle = "macOS Local Notification" // Optional subtitle
notificationContent.body = "This is a notification created with UNMutableNotificationContent" // Main content
notificationContent.sound = .default // Optional notification sound (set to nil for no sound)
notificationContent.badge = 1 // Optional app icon badge (set to nil for no badge)
// 3. Set trigger condition (here: "trigger after 3 seconds"; can also use time/calendar triggers)
let notificationTrigger = UNTimeIntervalNotificationTrigger(
timeInterval: 3, // Delay in seconds
repeats: false // Whether to repeat (false = one-time only)
)
// 4. Create a notification request (requires a unique ID for later cancellation if needed)
let notificationRequest = UNNotificationRequest(
identifier: "SwiftMacNotification_001", // Unique identifier
content: notificationContent,
trigger: notificationTrigger
)
// 5. Add the request to the notification center and wait for triggering
notificationCenter.add(notificationRequest) { error in
if let error = error {
print("Notification delivery failed: \(error.localizedDescription)")
} else {
print("Notification added to queue; will trigger in 3 seconds")
}
}
}
}
}
We are in the process of preparing our app to support the new Texas law (SB2420) that takes effect 1/1/2026.
After reviewing Apple's recent announcements/docs concerning this subject, one thing isn't clear to me: how to associate an app install with an App Store Server RESCIND_CONSENT notification that could be delivered to our server.
Our app is totally free so there isn't an originalTransactionId or other similar transaction IDs that would be generated as part of an in-app purchase (and then subsequently sent as part of the payload in the notification to our server during an in-app purchase scenario).
So my question is: How do I associate an app (free app) install with an App Store Server RESCIND_CONSENT notification that is sent to our server?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
App Store Server Notifications
Declared Age Range
My iPhone VoIP app, which I'm developing, uses Apple Push Notification service (APNs).
I have a question regarding the following statement found in "[Overview of app transfer > Apps using push notifications]"
Overview of app transfer
You must manually reestablish push notification services if transferring an app that uses
the Apple Push Notifications service (APNs). The recipient must create a new client
SSL certificate using their developer account, as associated client SSL certificates,
TLS certificates, and authentication tokens aren’t transferred.
Question
Let's say the recipient of the app transfer creates a "new SSL certificates, TLS certificates, and authentication tokens."
Afterward, we need to verify that the Apple Push Notification service (APNs) works correctly when combining the transferred app with this "new SSL certificates, TLS certificates, and authentication tokens."
However, until the recipient finishes verifying that it works correctly, the transferor want to keep the app available for download as before and be able to use the Apple Push Notification service. Is this possible?
More specifically, can the recipient test the app to be transferred on TestFlight "before the transfer is completed"?
I want to combine it with the "new SSL certificates, TLS certificates, and authentication tokens." and test it on TestFlight.
Reading "[Initiate an app transfer]," it mentions the existence of a "Pending App Transfer" status.
During this "Pending App Transfer" status, can the recipient test the app on TestFlight?
Initiate an app transfer
After you initiate the transfer, the app stays in its previous status, with the Pending App Transfer status added, until the recipient accepts it or the transfer expires after 60 days.
Also, if there are any documents describing these procedures, I would appreciate it if you could share them.
Thank you very much.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
App Store Connect
TestFlight
PushKit
We are facing an issue: push notifications are not being received. We are using the Marketing Cloud SDK for push notifications.
On install, the app correctly registers for push notifications. We pass the required information to Marketing Cloud — for example, contact key, token, etc. Marketing Cloud also confirms that the configuration is set up, and we have tried sending push notifications with proper delivery settings.
The issue is that after some time, the device gets automatically opted out in the Marketing Cloud portal. When we consulted their team, they said this is caused by the “DeviceTokenNotForTopic” error received from APNs. I have verified the certificates and bundle ID from my end — everything looks correct.
Device: iPhone 15, iPhone 17
iOS: 18.7.2, 26.1
We are encountering the following issue with our VoIP application for iPhone, published on the App Store, and would appreciate your guidance on possible countermeasures.
The VoIP application (callee side) utilizes a Wi-Fi network. The sequence leading to the issue is as follows:
VoIP App (callee): Launches
iPhone (callee): Locks (e.g., by short-pressing the power button)
VoIP App (callee): Transitions to a suspended state
VoIP App (caller): Initiates a VoIP call
VoIP App (callee): Receives a local push notification
VoIP App (callee): Answers the incoming call
VoIP App (callee): Executes performAnswerCallAction()
After this, the VoIP App (callee) uses "NSTimer scheduledTimerWithTimeInterval" to manage internal processing timing. However, the processing sometimes takes longer than the specified waiting time. Specifically, delays of several seconds can occur.
We understood that if the user is interacting with the screen and both the iPhone and the VoIP app are in an active state, the VoIP app's processing would not be delayed. However, can significant delays (several seconds) in application processing still occur even when the iPhone is in an active state (i.e., the user is interacting with the screen)?"