There's plenty of articles out there about programatically grouping push notifications. However I have tried setting the thread-id in the push payload when sending a push, or setting the threadIdentifier for a received push in a notification service extension to be the same for several pushes.
But if within the iPhone Settings / Notifications the user selects to display pushes as List and turns off Notification Grouping, then each notification resulting from the push appears on its own separately.
Is there something other than thread-id/threadidentifier that is used to programmatically group them? If not then whats the point of these as grouping and display is actually under the control of user.
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
I'm strugling about the way how to code notifications for my weather aplication. I use data from my server that receives weather changing values from my own weather station and want to notify user of my app when eg strong wind will blow or temperature go under eg 3℃ etc.
The weather station has 8 sensors so there is sometimes a lot of data changing in particular minute that i set to parse data from server and notify user about it. But the notifications only works only when app is on and couple minutes after locking display.
So please what could i use strategy for the app to works even when the app sleeps ?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
Notification Center
User Notifications
I'm experiencing issues with didRegisterForRemoteNotificationsWithDeviceToken not being called on iOS 18.1.1. Here's what I've tried:
Basic Setup:
Properly configured UNUserNotificationCenter
Requested permissions with requestAuthorization(options:)
Registered for remote notifications with registerForRemoteNotifications()
Environment:
Xcode 16.3
iOS 18.1.1 (physical device)
Firebase (tried with and without it)
Troubleshooting:
Verified provisioning profile includes Push Notifications
Confirmed APNs certificate is valid
Disabled Firebase's method swizzling
Tested on a clean project (works fine)
Checked device logs (no relevant errors)
Code Snippet:
// In AppDelegate.swift
public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
let tokenString = tokenParts.joined()
print("📱 Device Token: \(tokenString)")
// Store the token for your backend
UserDefaults.standard.set(tokenString, forKey: "deviceToken")
// Send to backend
Task {
do {
try await APIService.shared.setDeviceToken(tokenString)
} catch {
print("❌ [AppDelegate] Failed to send device token to backend: \(error)")
}
}
}
public func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
// IMPORTANT: First handle push notification registration
UNUserNotificationCenter.current().delegate = self
// Request notification permissions
self.requestNotificationPermissions()
// Register for remote notifications
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
return true
}
private func requestNotificationPermissions() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in
guard granted else {
print("❌ Notification permission not granted")
return
}
print("✅ Notification permission granted")
}
}
Hello, I received emails regarding the change to the Certification Authority (CA) for Apple Push Notification service, however I missed the February 24th 2025 deadline. What should I do? Push notifications to apple devices is currently not working.
Topic:
App & System Services
SubTopic:
Notifications
Hi Team,
We are building oru subscrption app and want to rely on server side purchase / subscription related notifications. We went through
https://developer.apple.com/documentation/appstoreservernotifications/enabling-app-store-server-notifications
We wanted to understand the reliability and latency for server side notifciations provided by Appstore.
Device: iPhone (real device)
iOS: 17.x
Permission: Granted
Notifications are scheduled using UNCalendarNotificationTrigger.
The function runs and prints "SCHEDULING STARTED".
However, notifications never appear at 8:00 AM, even the next day.
Here is my DailyNotifications file code:
import Foundation
import UserNotifications
enum DailyNotifications {
// CHANGE THESE TWO FOR TESTING / PRODUCTION
// For testing set to a few minutes ahead
static let hour: Int = 8
static let minute: Int = 0
// For production use:
// static let hour: Int = 9
// static let minute: Int = 0
static let daysToSchedule: Int = 30
private static let idPrefix = "daily-thought-"
private static let categoryId = "DAILY_THOUGHT"
// MARK: - Permission
static func requestPermission(completion: @escaping (Bool) -> Void) {
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.alert, .sound]) { granted, _ in
DispatchQueue.main.async {
completion(granted)
}
}
}
// MARK: - Schedule
static func scheduleNext30Days(isPro: Bool) {
print("SCHEDULING STARTED")
let center = UNUserNotificationCenter.current()
center.getNotificationSettings { settings in
guard settings.authorizationStatus == .authorized else {
requestPermission { granted in
if granted {
scheduleNext30Days(isPro: isPro)
}
}
return
}
// Remove old scheduled notifications
center.getPendingNotificationRequests { pending in
let idsToRemove = pending
.map { $0.identifier }
.filter { $0.hasPrefix(idPrefix) }
center.removePendingNotificationRequests(withIdentifiers: idsToRemove)
let calendar = Calendar.current
let now = Date()
for offset in 0..<daysToSchedule {
guard let date = calendar.date(byAdding: .day, value: offset, to: now) else { continue }
var comps = calendar.dateComponents([.year, .month, .day], from: date)
comps.hour = hour
comps.minute = minute
guard let scheduleDate = calendar.date(from: comps) else { continue }
if scheduleDate <= now { continue }
let content = UNMutableNotificationContent()
content.title = "Just One Thought"
content.sound = .default
content.categoryIdentifier = categoryId
if isPro {
content.body = thoughtForDate(scheduleDate)
} else {
content.body = "Your new thought is ready. Go Pro to reveal it."
}
let triggerComps = calendar.dateComponents(
[.year, .month, .day, .hour, .minute],
from: scheduleDate
)
let trigger = UNCalendarNotificationTrigger(
dateMatching: triggerComps,
repeats: false
)
let identifier = idPrefix + isoDay(scheduleDate)
let request = UNNotificationRequest(
identifier: identifier,
content: content,
trigger: trigger
)
center.add(request)
}
}
}
}
// MARK: - Cancel
static func cancelAllScheduledDailyThoughts() {
let center = UNUserNotificationCenter.current()
center.getPendingNotificationRequests { pending in
let idsToRemove = pending
.map { $0.identifier }
.filter { $0.hasPrefix(idPrefix) }
center.removePendingNotificationRequests(withIdentifiers: idsToRemove)
}
}
// MARK: - Helpers
private static func isoDay(_ date: Date) -> String {
let formatter = DateFormatter()
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.dateFormat = "yyyy-MM-dd"
return formatter.string(from: date)
}
private static func thoughtForDate(_ date: Date) -> String {
guard let url = Bundle.main.url(forResource: "thoughts", withExtension: "json"),
let data = try? Data(contentsOf: url),
let quotes = try? JSONDecoder().decode([String].self, from: data),
!quotes.isEmpty
else {
return "Stay steady. Your growth is happening."
}
let calendar = Calendar.current
let comps = calendar.dateComponents([.year, .month, .day], from: date)
let seed =
(comps.year ?? 0) * 10000 +
(comps.month ?? 0) * 100 +
(comps.day ?? 0)
let index = abs(seed) % quotes.count
return quotes[index]
}
}
Then here is my Justonethoughtapp code:
import SwiftUI
import UserNotifications
@main
struct JustOneThoughtApp: App {
@StateObject private var thoughtStore = ThoughtStore()
// MUST match App Store Connect EXACTLY
@StateObject private var subManager =
SubscriptionManager(productIDs: ["Justonethought.monthly"])
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(thoughtStore)
.environmentObject(subManager)
.onAppear {
// Ask for notification permission
NotificationManager.shared.requestPermission()
// Schedule notifications using PRO status
DailyNotifications.scheduleNext30Days(
isPro: subManager.isPro
)
}
}
}
}
final class NotificationManager {
static let shared = NotificationManager()
private init() {}
func requestPermission() {
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .sound, .badge]
) { _, _ in }
}
}
Having voice control enabled now puts three menu bar items. The blue icon it has always had, supplemented with an orange microphone and an orange dot next to control center. I know this orange icon is there to notify me that a third-party application is accessing the microphone, but this is a first-party system service that is always running. If another app starts accessing the microphone I won't know, since the orange icon is always there anyway. It's like a California prop 65 warning. Maybe it was a good idea in principal but with it being ubiquitous everyone just ignores it. Siri is also always accessing the microphone, but doesn't trigger this orange eyesore because it's a system service. Both Siri and voice control are always on in the background, are first-party system services that must be specifically enabled, and both have their own menu bar icon that can be removed if not wanted. This orange icon with voice control potentially introduces MORE risk by training me to ignore the orange icon. Please return to the pre-26.3 behaviour of using this orange icon for third-party apps and not first-party system services.
FB22036182 -- "Voice control causes extra menu bar icon"
Topic:
App & System Services
SubTopic:
Notifications
The system calendar when showing a calendar event shows a relative timestamp on the notification versus all other apps which have a timestamp of when the notification was sent.
Is there a way to set the timestamp to be relative? I am currently working on a calendar app and we should be able to use the same system that apple uses for its own calendar.
Post about this on stack overflow from someone else a few years ago
I'm working on an app that syncs with Apple Health events. Every time an event occurs, the app should send a notification.
The problem occurs when the app is backgrounded or force-closed; it can no longer send local notifications, and because these events can occur at any time, scheduled notifications can't be used.
I'm just wondering if anyone's found a creative way around this. I know we can't override system behaviour, I'm just thinking of other alternative solutions for the matter.
everytime i get my devicetoken from mdm certification,send to apns (api.push.apple.com 443),always return 400,please help me confirm if the devicetoken is expired or somethine wrong else
here is the request and response
device_token:79c3aec2b2c2b672c3b756c3910977c3a936c3aae280985ac380e280a6091cc2bfc3a132192b14c392c2be7a2ee280a229c3aa
push_magic:AAFDAB81-0E63-4B72-A60A-1F8085325870
status_code: 400
headers: {'apns-id': '14BDD477-7D76-A2FB-582C-140BBD95A420'} resp: {'reason': 'BadDeviceToken'}
Hello Apple Developer Support,
We are observing inconsistent behavior with push notification sounds routing to Bluetooth / external speakers.
Our app sends push notifications with a custom sound file using the sound parameter in the APNs payload. When an iPhone is connected to a Bluetooth speaker or headphones:
On some devices, the notification sound plays through the connected Bluetooth/external speaker.
On other devices, the notification sound plays only through the iPhone’s built-in speaker.
We also tested with native apps like iMessage and noticed similar behavior — in some cases, notification sounds still play through the phone speaker even when Bluetooth is connected.
Media playback (e.g., YouTube or Music) routes correctly to Bluetooth, so the connection itself is functioning properly.
We would like clarification on the following:
Is this routing behavior expected for push notification sounds?
Are notification sounds intentionally restricted from routing to Bluetooth in certain conditions (e.g., device locked, system policy, audio session state)?
Is there any supported way to ensure notification sounds consistently route through connected Bluetooth/external speakers?
The inconsistent behavior across devices makes it difficult to determine whether this is by design or a configuration issue.
Thank you for your guidance.
Hi,
We are using Firebase to configure APNs (Apple Push Notification Service) for sending push notifications. During local testing, the push notifications are received properly when the app is in the foreground or background. After TestFlight testing and passing review, we found that when the app is installed using the developer's Apple ID, push notifications are received correctly whether the app is in the foreground or background.
However, when the app is provided to other testers (using non-developer Apple IDs), notifications are only received when the app is in the foreground, and they are not triggered when the app is in the background or inactive state.
Request for Assistance:
Why, after TestFlight testing and passing review, does the app receive push notifications properly in the background when installed using the developer's Apple ID, but on other testers' devices, notifications are not received when the app is in the background?
Are there any differences in Apple ID types or device configurations (developer ID vs. regular tester ID) that could affect the behavior of push notifications in the background mode?
Do we need to apply any additional settings or permissions, particularly for handling background push notifications?
Are there any iOS version or device-specific limitations that could impact the proper delivery of background push notifications?
Additional Information:
The app is properly configured for APNs, and push notifications are being sent via Firebase.
In the developer's Apple ID test environment, the app receives push notifications properly whether it is in the foreground or background.
On other testers' devices, push notifications are only received when the app is in the foreground, and they are not received when the app is in the background.
All test devices have been verified to have notification permissions enabled, and Firebase configuration is correct.
Hi,
We have a use case where our app needs to send repeated push notifications (both normal and critical alerts) to inform the user about a critical device state and grab their attention.
Since iOS doesn’t allow us to schedule local notifications beyond 30 seconds, I need to send multiple pushes from the server side.
My questions are:
Is there any documented limit on how many push notifications can be sent back-to-back before Apple starts throttling or restricting them?
Are critical alerts treated differently from normal notifications in terms of delivery restrictions or frequency limits?
Is there a recommended approach for handling scenarios where repeated urgent notifications are necessary to keep the user informed?
I want to make sure I’m following Apple’s guidelines and not risking rejection during review.
Hi all,
I have a React web app that we use as a Progressive Web App (PWA). We currently:
Use PWA Builder to package it for Android and iOS
Host the app on a secure HTTPS URL
Use Firebase Cloud Messaging (FCM) for push notifications (working on Android)
However, on iOS, we are unable to get push notifications to work. I understand that PWAs on iOS have limited push support (Safari only, and not through WebView). So I explored using Capacitor, but:
Capacitor can load a server.url pointing to our hosted app (great for reuse), but push notifications don’t work
If we build the web app locally (npm run build) and embed it in the native iOS shell via Capacitor, push works
We would prefer not to fully merge our authentication and main app UIs if avoidable
Questions:
Is there any approved way to enable push notifications in an iOS .ipa built from a hosted web app (URL) using PWA Builder?
If not, is embedding the web assets locally the only Apple-approved way to get push support?
Are there any best practices or native plugin recommendations (e.g., APNs or FCM) for handling push notifications in iOS app?
Thanks in advance for any guidance. 🙏
Let me know if more technical details would help.
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
I submitted the form for the critical alert entitlement but have not received any response for already 2 weeks. How long does it normally take to review such requests? Is there any way I can contact a certain department directly?
We have been getting several reports in the past 2 weeks of APNs notifications being either heavily delayed or not delivered at all.
We have two apps, one of which has a Notification Service Extension and one of which does not. We have had users of both reporting sporadic notification problems.
Looking at the sysdiagnose logs from one example, it looks like the notification was actually processed by our notification extension in a timely fashion, but was not displayed to the user.
An example event we investigated it the following (now perhaps a little long in the tooth):
2025-10-31T14:32:54
apnsId=EE3E002D-26DE-B4F5-5E9B-5E0C1E1B6B3D
We think we have correlated this with device logs:
default 2025-10-31 10:32:54.472054 -0400 [EDE9521D-8A65-4588-8AE8-D3D78B9E5EA5] Received replacement content for notification request 859D-ABC7 [ hasContent: 1 attachments: 0 ]
However there is no other reference until the app was launched about 1.5 minutes later:
default 2025-10-31 10:34:26.875327 -0400 [..] Got 1 delivered notifications [ hasCompletionHandler: 1 ]
When trying to reproduce, when I saw notifications bannered, the trace I saw was "Got 0 delivered notifications". What's the significance of "Got 1 delivered notifications" in this case?
Historically, SpringBoard logs have shown detailed trace about the handling of notifications (which was very useful in narrowing down the slowness of notifications due to Apple Intelligence, reported on our side as FB16253547, which doesn't seem to have been triaged but it looks like was resolved around iOS 18.2.1 or iOS 18.3); however it seems that now sysdiagnoses are only containing <1 minute of trace from SpringBoard.
Is there any way to extend the trace from SpringBoard that is included in sysdiagnoses?
I see there was also https://developer.apple.com/forums/thread/806367 around the same time we started receiving reports. However I think my hypothesis is that this is a client-side issue, and notifications are being delivered to devices, just not presented correctly.
Will try and collect a bit more data and file some Feedbacks and provide them here, but wanted to also flag here in case there are any others experiencing similar.
I have a database in CloudKit, where the host share (using CKShare) a record to participants. The record is in her private database, but for the participants is in their shared database. How do I send push notifications to everyone when a new child record is created?
Hello,
I am writing this because the behavior of the App Store Server Notification that our server receives is problematic in the Sandbox environment.
I have two questions in total.
When purchasing a Free Trial subscription, after receiving the SUBSCRIBED / INITAL_BUY Notification, DID_RENEW should be sent when it expires, but DID_FAIL_TO_RENEW/GRACE_PERIOD is sent.
The EXPIRE Notification is sent after the subscription expires or DID_CHANGE_RENEWAL_STATUS/AUTO_RENEW_DISABLED is sent, but it does not arrive.
The first problem is that I recently heard that automatic payments after a free trial require the user's consent via email. Is this the reason?
If so, I am curious about how I can test it in the Sandbox environment.
Is the second problem a bug?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
Subscriptions
In-App Purchase
App Store Server Notifications
Push-notification token is properly requested and displayed from the iOS simulator / xcode, but not from the release in the AppStore... Both popups for permission (push-notifications and critical alert) appear and can be confirmed, but no callback takes place...
Topic:
App & System Services
SubTopic:
Notifications