I'm having a reproducible problem receiving push notifications on macOS 26.2.
The pattern is that the push is received and then discarded almost immediately (there is a 60s expiration date) when on battery power and then when I plug in pushes start working and even if I unplug again it works for hours until breaking again.
These are alert notifications with priority 10.
Other team members have had similar problems but less reliably broken and even get a "stored for device power considerations" message followed by discarded (see apns-unique-id c29250a3-abbf-008a-96f9-a5384e32d1df).
An example from my machine with the apns-unique-id 6b2dfe3d-af99-182a-0e1e-6b811d3ec486 which fails immediately.
iOS is working fine however so this seems to be confined to macOS only.
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
Created
I'm sending local push notifications and want to show specific content based on the id of any notification the user opens. I'm able to do this with no issues when the app is already running in the background using the code below.
final class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate {
let container = AppContainer()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
let center = UNUserNotificationCenter.current()
center.delegate = self
return true
}
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: () -> Void) {
container.notifications.handleResponse(response)
completionHandler()
}
}
However, the delegate never fires if the app was terminated before the user taps the notification. I'm looking for a way to fix this without switching my app lifecycle to UIKit.
This is a SwiftUI lifecycle app using UIApplicationDelegateAdaptor.
@main
struct MyApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
I’m aware notification responses may be delivered via launchOptions on cold start, but I’m unsure how to bridge that cleanly into a SwiftUI lifecycle app without reverting to UIKit.
We have been experimenting with silent notifications to update the content in our app and connected bluetooth peripheral at regular intervals. We are facing issues every once in a while with some users not receiving the notifications reliably even if the app is in the background and not killed.
Is there a way we can ensure we reliably receive notifications every time without any issues? If there is no guaranteed delivery with silent notifications, then is there any other way that we can explore to achieve our use case?
Is there any information for developer about notification forwarding which is published in iOS 26.3? how to use it ?
Im creating a basic app, needs push notification capability. I have created two profiles (development & distribution), selected my app in Identifiers and checked the PN box to enable it (no need for broadcast). I add the profile to Xcode and it says "Provisioning profile "New VP App Jan 2026" doesn't include the Push Notifications capability."
What am I missing?
Topic:
App & System Services
SubTopic:
Notifications
I’m currently developing an iOS app built in Unity, exported to Xcode for signing and deployment. The app needs to register for Apple Push Notifications (APNs) to retrieve the device token and register it with a backend service (PlayFab).
Despite enabling the required capabilities and entitlements, the app never receives a device token — the authorization request succeeds, but the token remains empty (req.DeviceToken is null in Unity).
I’ve confirmed that the issue occurs before PlayFab or Firebase are involved, meaning the app never receives the token from Apple Push Notification service (APNs) itself.
The Unity script I am using is:
#if UNITY_IOS
using UnityEngine;
using Unity.Notifications.iOS;
using PlayFab;
using PlayFab.ClientModels;
using System.Collections;
using System;
public class iOSPushInit : MonoBehaviour
{
private const int MaxRetries = 5;
private const float RetryDelay = 2f; // seconds
void Start()
{
Debug.Log("🛠 iOSPushInitDebug starting...");
StartCoroutine(RequestAuthorizationAndRegister());
}
private IEnumerator RequestAuthorizationAndRegister()
{
// Request Alert + Badge + Sound permissions and register for remote notifications
var authOptions = AuthorizationOption.Alert | AuthorizationOption.Badge | AuthorizationOption.Sound;
using (var req = new AuthorizationRequest(authOptions, true))
{
Debug.Log("⏳ Waiting for user authorization...");
while (!req.IsFinished)
{
yield return null;
}
Debug.Log($"🔔 Authorization finished at {DateTime.Now}: granted={req.Granted}, error={req.Error}");
if (!req.Granted)
{
Debug.LogError("❌ User denied notification permissions! Cannot get APNs token.");
yield break;
}
// Authorization granted → check for device token
int attempt = 0;
string token = req.DeviceToken;
Debug.Log($"req.DeviceToken: {req.DeviceToken}");
while (string.IsNullOrEmpty(token) && attempt < MaxRetries)
{
attempt++;
Debug.Log($"ℹ️ APNs token not available yet. Attempt {attempt}/{MaxRetries}. Waiting {RetryDelay} seconds...");
yield return new WaitForSeconds(RetryDelay);
token = req.DeviceToken;
}
if (string.IsNullOrEmpty(token))
{
Debug.LogWarning("⚠️ APNs token still null after multiple attempts. Try again on next app launch.");
yield break;
}
Debug.Log($"📱 APNs Token acquired at {DateTime.Now}: {token}");
// Register with PlayFab
var request = new RegisterForIOSPushNotificationRequest
{
DeviceToken = token,
SendPushNotificationConfirmation = false
};
PlayFabClientAPI.RegisterForIOSPushNotification(request,
result => Debug.Log("✅ APNs token successfully registered with PlayFab."),
error => Debug.LogError("❌ Failed to register APNs token with PlayFab: " + error.GenerateErrorReport()));
}
}
}
#endif
When running on a real device (not simulator), the following is logged in Xcode:
🔔 Authorization finished: granted=True, error=
ℹ️ APNs token not yet available. Try again on next app launch.
In the Xcode console, I do not see the expected APNs registration message:
[Device] Registered for remote notifications with token: <...>
Environment Details:
Engine: Unity 6000.2.6f2
Notifications package: com.unity.mobile.notifications 2.4.2
Xcode: 16.4 (16F6)
iOS Device: iPhone 12, iOS 26.0.1
Testing Method: Building directly from Unity → Xcode → real device
Signing mode: Automatic (with correct Team selected)
Certificates in account:
Apple Development certificate (active)
Apple Distribution certificate (active)
Provisioning Profile:
Type: App Store (also tested Development profile)
Enabled Capabilities: Push Notifications, In-App Purchase
App ID Capabilities:
Push Notifications: Enabled
Development SSL certificate: Present
Production SSL certificate: Not generated (yet)
Background Modes -> remote notifications
What I Have Verified:
✅ Push Notifications capability is enabled in the Xcode target (not UnityFramework).
✅ Team and Bundle Identifier match my Apple Developer App ID.
✅ App ID has Push Notifications enabled in the Developer Portal.
✅ Tested on a real iOS device with working internet.
✅ Rebuilt and reinstalled app after enabling Push Notifications.
✅ Authorization dialog appears and permission is granted by user.
How can I resolve this issue?
Topic:
App & System Services
SubTopic:
Notifications
Hi, happy new year, I'm a Product Manager for a communications app that's currently in testflight. We requested the com.apple.developer.usernotifications.filtering entitlement on December 3rd, and have yet to receive a response from Apple. I understand that the holiday break may have gotten in the way, however it feels like we were lost in the queue as it's been 6 weeks with no response. Our app owner has checked-in inside appstoreconnect but has not received anything back.
Is this common? Is there any process for getting a status update?
Are we doing something wrong?
Without this entitlement we cannot make the device ring in the background. The app is a voice and video messaging platform.
Our application is designated to be used in a quite noisy environment (childcare facility) so we have implemented really annoying custom sounds. Unfortunately the system audio session playing custom sounds is apparently limited to half of the device volume possibility, even though the user sets full volume in the settings. How to change this behaviour to get louder notification sounds?
To be clear, I don't want to overcome user settings. If the user sets quieter volume or he sets the silent mode, the application should be silent too. I just need that 100% volume settings is actually 100% device volume.
This is a really critical feature for us and for our customers. We have already tried to ask for the critical alerts and we have been rejected.
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.
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
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
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
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
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!
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.
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")
}
}
}
}
}