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

Skipping Notifications permission alert on sequoia
Hello, it seems like starting from iOS 18.0, it is possible to entirely skip the notifications permission request alert by swiping up from the bottom of the screen. It doesn't work this way with any other kinds of system alerts, nor in iOS 17.4 (tested it in the Simulator though). So, is it a bug? Or is it intended? Either way, I haven't found any information regarding that. The problem with that is when you skip the alert, notifications are missing from the app preferences.
1
0
323
Jan ’25
SHA-2 Root: USERTrust RSA Certification Authority certificate.
Got notification to update this certificate - there was a link to Sectigo.com where I found an attachment with that name - when I clicked it I got a box where it said to install it. Clicked the box and it was saved somewhere on my computer. Now I dont know if that's it or I need to take further actions - please help :-) Have no experience with this - my collegue who did this has stopped. Hoping for a simple answer :-) P
3
0
508
Feb ’25
Live Activity don't show properly in Apple Watch
I'm facing an issue with Live Activity on the Apple Watch. I followed all the configurations outlined in Apple's official documentation, but during testing, I noticed inconsistent behavior. Some devices can display the Live Activity on the Apple Watch without any issues, while others can only see it on the iPhone, even though they are running the same system version. I've already checked the permissions, and everything is set up correctly, but I still haven't found what might be causing this difference. Has anyone experienced something similar or has any debugging suggestions?
0
0
242
Feb ’25
Push notifications to api.push.apple.com sometimes fail
We have a case when we send 8 push notifications more or less simultaneously over 1 HTTP 2.0 connection. Using .NET Core 8 Sometimes some of them fail with a strange message: System.Net.Http.HttpRequestException: The response ended prematurely while waiting for the next frame from the server. (ResponseEnded) ---> System.Net.Http.HttpIOException: The response ended prematurely while waiting for the next frame from the server. (ResponseEnded) at System.Net.Http.Http2Connection.ThrowRequestAborted(Exception innerException) at System.Net.Http.Http2Connection.Http2Stream.TryEnsureHeaders() at System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync(CancellationToken cancellationToken) at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.HttpClientLoggerHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) We noticed that failure is always accompanied with a huge delay (~500ms) comparing to success (~20ms). Also some of the burst messages are sent successfully (sometimes 2-4 of them) What can we do about it?
2
0
459
Feb ’25
didRegisterForRemoteNotificationsWithDeviceToken Not Called on iOS 18.1.1
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") } }
1
0
75
May ’25
Texts being received to incorrect phone number
Anne has two phone numbers, work and personal. Beth saved both phone numbers for Anne under one contact profile. When Beth sends a text to Anne's work phone, it is received on Anne's personal phone instead. We have verified only one phone number is set up under Messages settings, signed out of messages, restarted the phones. Any other fixes or suggestions?
0
0
336
Nov ’24
How to turn off shortcuts notifications permanently apart from turning it off via screen time as it keeps turning itself back ON.
I have created a configuration profile which basically just turns off notifications for Shortcuts app but I am unable to install it on my iPhone as I am getting the following error “This profile can be installed on a supervised device only” can someone please help me with this? Would also appreciate if you have another way to turn off shortcuts notifications permanently since when I turn it off via screen time it keeps turning itself ON every couple of days.
0
0
286
Feb ’25
Silent push notifications not received
I have a flutter app which receives bot alert and silent notifications. The alert notifications are received properly whilst the silent ones do not trigger any function. My app is based on OneSignal but for the testing i am also trying to directly send the notifications using the APN console. Using either alert or background type notification I am using real device (iPhone XR) The background modes are set to "Background fetch" and "Remote notifications" The token is valid as i am getting alert notifications. The app has notification permissions. The didReceiveRemoteNotification never gets triggered (for alert or silent types) When sending alert notification i do see the printout of "willPresent notification" Here is my AppDelegate.swift code. @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data ) { // Log device token to ensure correct registration let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) } let token = tokenParts.joined() print("Device Token: \(token)") } override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { // Request full notification permissions UNUserNotificationCenter.current().requestAuthorization( options: [.alert, .badge, .sound, .provisional, .criticalAlert] ) { (granted, error) in print("Notification Authorization Granted: \(granted)") if let error = error { print("Notification Authorization Error: \(error.localizedDescription)") } // Always attempt to register for remote notifications DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() } } // Set notification center delegate UNUserNotificationCenter.current().delegate = self GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } // Add this method to handle foreground notifications override func application( _ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void ) { print("🔔 FULL didReceiveRemoteNotification CALLED") print("Full Payload: \(userInfo)") // Detailed logging of APS dictionary if let aps = userInfo["aps"] as? [String: Any] { print("APS Dictionary: \(aps)") print("Content Available: \(aps["content-available"] ?? "Not Found")") } // Explicit silent notification check if let aps = userInfo["aps"] as? [String: Any], let contentAvailable = aps["content-available"] as? Int, contentAvailable == 1 { print("✅ CONFIRMED SILENT NOTIFICATION") // Perform any background task here completionHandler(.newData) return } print("❌ Not a silent notification") completionHandler(.noData) } override func application( _ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void ) { print("🔄 Background Fetch Initiated") // Perform any background fetch tasks completionHandler(.newData) } override func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void ) { let userInfo = notification.request.content.userInfo print("**** willPresent notification ****") print("Full Notification Payload: \(userInfo)") // Explicitly log the aps dictionary if let aps = userInfo["aps"] as? [String: Any] { print("APS Dictionary: \(aps)") print("Content Available: \(aps["content-available"] ?? "Not Found")") } // Check for silent notification if let aps = userInfo["aps"] as? [String: Any], let contentAvailable = aps["content-available"] as? Int, contentAvailable == 1 { print("**** CONFIRMED SILENT NOTIFICATION IN FOREGROUND ****") completionHandler([]) return } // For non-silent notifications if #available(iOS 14.0, *) { completionHandler([.banner, .sound]) } else { completionHandler([.alert, .sound]) } } }
2
0
662
Dec ’24
Iphone 12 Mini - Bluetooth Problem - IOS 18
I have been experiencing a consistent problem when connecting to a bluetooth device (Speaker, Vehicle, Etc.) where the music cuts-out every time I receive a notification or my Iphone screen turns on or off. This never happened before the update. I have tried restarting, downgrading to previous IOS versions and reupdating to the latest. No luck, unfortunately. I thought this might be due to the devices, but this happens when playing music through my device as well. I have checked the notification settings and haven't found anything that fixes this problem. Any assistance would be much appreciated.
1
0
374
Oct ’24
Remotely dismissing notifications on iOS
I am sending push notifications on iOS, and I can receive and display them correctly. I want to be able to dismiss notifications that have been read server-side (e.g. on a different device) so I am trying to send a custom notification payload alongside a badge counter update, that specifies what notification IDs to remove. I then use removeDeliveredNotifications on the IDs I get. However, it doesn't seem to be working. I am setting the identifier using the apns-collapse-id header and I do see that reflected on the device side. Any ideas what I might be doing wrong? This is how I'm handling push notifications: func userNotificationCenter( _ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void ) { let customPayload = notification.request.content.userInfo if let dismissedNotifications = customPayload["dismissed_notifications"] as? [String] { center.removeDeliveredNotifications(withIdentifiers: dismissedNotifications) } completionHandler([.banner, .sound, .badge]) } I also tried doing the same thing inside func userNotificationCenter( _ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void ) Thank you!
3
0
447
Feb ’25
I don't understand apple store server to server notification
Hello, I'am trying to validate a new app from apple. I have configured sandbox url and production url for server to server apple store notification. I have created subscriptions product id, but there are no validated yet by apple. When I upload my app to testflight, I can't test sandbox notification cause the product id are not available, on local xcode with storekit file I got my product Id but I don't receive notification. So my question is how can I test there thing. I have to produce fake product id ? I'm lock its very complex process, I don't understand. I tried to send my app like that for verification but the team told me to use receipt, but its deprecated and notification webhook is better for me. What is the good order, validate my subscription product ID then test ? what is the good steps. Apple seems to don't want validate my subscription product ID I'm lock..
0
0
299
Jan ’25
CarPlay: no banner or sound for APNs while connected, works on phone (iOS 18.0, UNNotificationCategoryOptions.allowInCarPlay)
Hi everyone! I’m integrating push notifications for a taxi-driver app and ran into a blocking CarPlay issue. When the iPhone is connected to CarPlay (wired or wireless), the push arrives on the phone without any sound and nothing is shown or announced on the CarPlay screen. If I unplug CarPlay, the same push plays the default sound and shows a normal banner on the lock screen, so the payload itself looks valid. Environment iPhone 13 Pro, iOS 18.0 CarPlay head-unit: Xcode 16.2 CarPlay Simulator App built with Flutter 3.22 + firebase_messaging: ^15.2.5 Deployment target: iOS 14.0 Xcode capabilities enabled: Push Notifications, Time-Sensitive Notifications App settings on the device: Allow Notifications -› Sounds ON, Show in CarPlay ON Siri › Announce Notifications › CarPlay: master toggle ON + my app added to the allowed list Driving Focus = Off (same result if it’s On) Native setup in AppDelegate.swift UNUserNotificationCenter.current().requestAuthorization( options: [.alert, .sound, .badge, .carPlay] ) { _,_ in } let carPlayCategory = UNNotificationCategory( identifier: "CARPLAY_ORDER", actions: [], intentIdentifiers: [], options: [.allowInCarPlay] ) UNUserNotificationCenter.current().setNotificationCategories([carPlayCategory]) UNUserNotificationCenter.current().delegate = self application.registerForRemoteNotifications() APNs payload that I send via FCM { "aps": { "alert": { "title": "New test order", "body": "Location info test" }, "sound": "default", "category": "CARPLAY_ORDER", "interruption-level": "time-sensitive", "relevance-score": 1 } } What could be the problem? Please help me solve the error
2
0
104
Jun ’25
HOW TO: make sure that both old and new server certificates are included in the Trust Store
We are struggling with the lack of information provided by Apple re: Apple Push Notification service server certificate update We want help from other developers on HOW TO: make sure that both old and new server certificates are included in the Trust Store Exactly HOW is this done? What is the Trust store and how is it accessed? Is this done for our account once OR for each for the apps utilising APNs? Can anyone assist? Thanks Louise
1
0
174
Jan ’25
Enabling voip in react native
Currently working on a dating app which needs voip for audio and video calls for ios. the voip notifications only comes to the app in active and inactive mode but doesnt wake the device in background or terminated mode. After debugging i noticed that com.apple.developer.voip entitlement wasnt included which i later added, trying to create a build i get the eas error that the entitlement wasnt added to the identifier capabilities. My issue now is that i can't seem to find the voip capability to check in the identifiers capabilities list for the bundle id.d
1
0
69
Jun ’25
Status of Action Required: Apple Push Notification Service Server Certificate Update
According to the Apple notification alert received in October 2024, the APNS server certificate update for production is scheduled for February 24, 2025. Has this change been implemented, or is there a platform or method to verify whether this update has been applied in production? If so, where can we check this?"
1
0
305
Feb ’25