Notifications

RSS for tag

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

Notifications Documentation

Post

Replies

Boosts

Views

Activity

Inquiry About Upcoming Changes to APNs Certificates
Hello, I’m reaching out to gather information regarding the upcoming changes to APNs certificates that are set to be implemented in the beta at the end of January 2025. Specifically, I would like to understand the following: What will be the practical impact of these changes on apes apis ? What actually needed to be done at trust store for this changes, and how will it affect our current setup? What steps do we need to take to update the certificates on our servers? it’s crucial for us to address these changes in advance and keep our customers informed. Thank you for your help!
10
4
2.9k
Oct ’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
77
10h
iOS doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an APNs PUSH
I am developing an application that uses NetworkExtension (Local PUSH function) And VoIP(APNs) PUSH. Nowadays, I found a problem on this app doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an APNs PUSH. My confimation result of my app and server log is below. 11:00 AM: my server(PBX) requests a VoIP(APNs) PUSH notification to the APNs. But my app does not receive the VoIP(APNs) PUSH. At this time, my app is running on LAN (Wi-Fi without internet connection), as a result, NetworkExtension was running. so I think this is normal behaviour. 14:55:11 PM: There is an incoming call from the my server(PBX) via local net, and NetworkExtension calls iOS API(API name is reportIncomingCall). However, iOS does not call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall. 14:55:11 PM: At almost the same time, iOS calls the delegate cdidReceiveIncomingPushWithPayload of VoIP PUSH. (instead of call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall?) And the content of this VoIP(APNs) PUSH was the incoming call at "11:00 AM". In other words, the VoIP(APNs) PUSH at 11:00 AM is stuck inside iOS, and at 14:55:11 PM, from NetworkExtension reports it. I feel there is a problem on iOS doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an VoIP(APNs) PUSH. Would you tell me Apple's opioion about this? If this is known problem, Please tell me about it.
4
0
361
Jan ’25
Certification Authority (CA) for Apple Push Notification service (APNs)
I got a notification that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. Does this affect the push service for Apple Wallet passes or just for apps? I have a push service for Apple Wallet passes but no service for apps. I don't use push notification service for anything other than for Apple Wallet Pass push notifications, not at all for apps. Is there anything I need to do or is this not relevant to my situation? If it does, what do I need to change in order to make sure my service still works? Do I just replace the certificate? Is there a standard path where it would live on the server? I'm sure this is a simple thing, but it's been over a decade since I wrote the push service so I'm pretty rusty.
1
0
99
1d
Implement UNUserNotificationCenterDelegate in iOS app using Swift6
I've got a problem with compatibility with Swift6 in iOS app that I have no idea how to sort it out. That is an extract from my main app file @MainActor @main struct LangpadApp: App { ... @State private var notificationDataProvider = NotificationDataProvider() @UIApplicationDelegateAdaptor(NotificationServiceDelegate.self) var notificationServiceDelegate var body: some Scene { WindowGroup { TabView(selection: $tabSelection) { ... } .onChange(of: notificationDataProvider.dateId) { oldValue, newValue in if !notificationDataProvider.dateId.isEmpty { tabSelection = 4 } } } } init() { notificationServiceDelegate.notificationDataProvider = notificationDataProvider } } and the following code shows other classes @MainActor final class NotificationServiceDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { var notificationDataProvider: NotificationDataProvider? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { UNUserNotificationCenter.current().delegate = self return true } func setDateId(dateId: String) { if let notificationDataProvider = notificationDataProvider { notificationDataProvider.dateId = dateId } } nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { // After user pressed notification let content = response.notification.request.content if let dateId = content.userInfo["dateId"] as? String { await MainActor.run { setDateId(dateId: dateId) } } } nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions { // Before notification is to be shown return [.sound, .badge, .banner, .list] } } @Observable final public class NotificationDataProvider : Sendable { public var dateId = "" } I have set Strict Concurrency Checking to 'Complete.' The issue I'm facing is related to the delegate class method, which is invoked after the user presses the notification. Current state causes crash after pressing notification. If I remove "nonisolated" keyword it works fine but I get the following warning Non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary; this is an error in the Swift 6 language mode I have no idea how to make it Swift6 compatible. Does anyone have any clues?
1
15
860
Aug ’24
Is the Time Sensitive Notification entitlement needed for visionOS?
I noticed the time sensitive entitlement says it's only for iOS and macOS. But without the entitlement, the time sensitive toggle doesn't show in my app's notification settings on visionOS. When I archive my visionOS app for App Store Connect, the entitlement seems to be taken out as it doesn't show in my entitlement list for the build in App Store Connect. I'm confused at this point if the entitlement is really necessary, since it seems to be needed to debug on the simulator at least. I don't have a physical device to test it on unfortunately.
0
0
136
3d
About APNS certificate replacement
I received an email from Apple saying that I needed to replace the APNS certificate. I am inquiring because I am curious about who has the relevant authority and who actually makes the changes. Could you please provide specific guidance on this? Hello, We’re reaching out with a final reminder that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs updated the server certificates in sandbox on January 21, 2025. APNs production server certificates will be updated 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. If you have any questions, please contact us. The Apple Developer Relations Team
3
0
478
1w
Start live activity with push notification problem
Hey there, i implemented live activity in my app and iam trying to start the live activity from push notification, updates works fine even when the app is in background but starting the activity creating issue mostly on background and kill mode when i check the delivery of live activity on cloudkit console it says stored for device power considerations. anyone having the same issue ?
1
0
570
May ’24
Is it possible to increase priority of background notifications?
I have an app that pairs with a wearable Bluetooth device that collects users' health data. My web backend sends two push notifications every hour to all app users—one at XX:05 and another at XX:15. The first notification instructs the app to download data from the paired wearable device, while the second prompts the app to upload the downloaded data to the backend server's database. However, I’ve noticed that many push notifications are not processed by iOS apps, especially at night. Based on Apple's documentation, iOS prioritizes push notifications and may ignore lower-priority ones to conserve battery life. Is there a way to increase the priority to ensure that more (or all) push notifications are processed? Would integrating the HealthKit framework help? Currently, I use Firebase Cloud Messaging (FCM) to send push notifications. Additionally, my app falls under the Health & Fitness category. Would changing it to Medical increase priority? P.S. I understand that Apple requires certain certifications for an app to be classified as Medical.
2
0
86
4d
Apple Wallet Pass Logo Not Showing on notification on iOS 18
I'm having trouble displaying the Apple Wallet pass logo on iOS 18 when a notification occurs. It works on iOS 17 but not on iOS 18 (tested on versions 18.1 and 18.3). I ensured the Wallet pass icon sizes are correct: icon.png → 29×29 icon@ 2x.png → 58×58 icon@ 3x.png → 87×87 Questions: Has Apple changed any requirements for displaying Wallet pass logos in iOS 18? Are there new size, format, or metadata constraints?
3
0
216
3w
Badge Number Persists When Re-Installing Application
I have been working on adding a badge number count to my app, but have run into a really weird edge case. If I have a badge number on my app, delete the application and then re-install it, the badge number still persists on the app icon until I first open the app. I tried looking to see if there is a lifecycle method that is triggered upon uninstalling an app as well as if there is a specific userDefaults attribute to check in order to clear the badge, but I can't find any clear solutions. Does anyone know of a fix to this issue?
1
0
164
2w
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
204
6d
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
254
1w
Timezone for Device Notification statistics?
What timezone is used in the CloudKit Push Notification reporting? Meaning, when I see 1,000 Sent Push Notifications on 2/18, is that 2025-02-18 00:00 through 2025-02-18 23:59 PST? EST? UTC? The metrics shown in [the CloudKit Push Notification reporting] are not lining up with stats from my marketing system, and I'm trying to diagnose. Also, is there a way to see DELIVERIES or just SENT? I'm looking to learn more about why a Notification would be Sent but not received by the user. Thank you!
2
0
181
6d
Clarification Needed on Apple Push Notification Service Server Certificate Update Requirements for Token-Based vs. Certificate-Based Authentication
Hello Apple Developer Team, Based on the mandate to update the APNs certificate by February 24, 2025 for certificate-based authentication, a question from the team has been brought up that maybe Apple or the community can help answer. Since our implementation uses token-based authentication, I’m seeking clarification on a couple of points: 1. Does the certificate update affect token-based connections at all? 2. What is the rationale behind updating certificates for certificate-based authentication, and are there any implications or benefits for developers using token-based authentication? Understanding these details will help us ensure our system remains compliant and optimally configured. Any guidance or further clarification you can provide would be greatly appreciated. Thank you!
2
0
291
1w
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
186
1w