Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Notification Center

RSS for tag

Create and manage app extensions that implement Today widgets using Notification Center.

Posts under Notification Center tag

53 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

System clock ancs notification is not sent on iPhone >= 14
I'm working on a ble connected device that use ancs and system clock to receive alarm notification events for earing impaired people. It used to work until iPhone 13 with latest iOS 18.x. Starting with iPhone 14 onward (iOS 18.x), system clock alarm notification is not sent anymore. Is There any reason for this to happening?. Is anyone aware of this behaviour? Any suggestion would be really appreciated. Cheers
2
0
100
1w
Regarding the change of device tokens after an iOS update
In the app we are developing, we update the device token upon app launch using didRegisterForRemoteNotificationsWithDeviceToken. Previously, after an iOS major update, if the app was left without being launched, users experienced an issue where notifications would not be received. Later, we confirmed that running didRegisterForRemoteNotificationsWithDeviceToken during app launch updates the device token and restores the ability to receive notifications. Therefore, we believe that the device token may change due to an iOS major update. We want to understand the detailed conditions under which the device token is updated due to an iOS update: Does the same issue occur after iOS minor updates as well? Does it always happen during iOS major updates? We reviewed the official documentation, but there was no detailed description of the device token update conditions. Additionally, we contacted Apple, but received no clear answers. If anyone has experienced the same situation, we would appreciate any information you can share.
2
0
65
2w
The NSTextViewDelegate method textViewDidChangeSelection(:) will not fire, while all other text view delegate methods do.
I am trying to implement the NSTextViewDelegate function textViewDidChangeSelection(_ notification: Notification). My text view's delegate is the Coordinator of my NSViewRepresentable. I've found that this delegate function never fires, but any other delegate function that I implement, as long as it doesn't take a Notification as an argument, does fire (e.g., textView(:willChangeSelectionFromCharacterRange:toCharacterRange:), fires and is called on the delegate exactly when it should be). For context, I've verified all of the below: textView.isSelectable = true textView.isEditable = true textView.delegate === my coordinator I can call textViewDidChangeSelection(:) directly on the delegate without issue. I can select and edit text without issues. I.e., the selections are being set correctly. But the delegate method is never called when they are. I am able to add the intended delegate as an observer for the selector textViewDidChangeSelection via NotificationCenter. If I do this, the function executes when it should, but fires for every text view in my view hierarchy, which can number in the hundreds. I'm using an NSLayoutManager, so I figure this should only fire once. I've added a check within my code: func textViewDidChangeSelection(_ notification: Notification) { guard let textView = notification.object as? NSTextView, textView === layoutManager.firstTextView else { return } // Any code I want to execute... } But the above guard check lets through every notification, so, no matter what, my closure executes hundreds of times if I have hundreds of text views, all of them being sent by textView === layoutManager.firstTextView, but once for each and every text view managed by that layoutManager. Does anyone know why this method isn't ever called on the delegate, while seemingly all other delegate methods are? I could go the NotificationCenter route, but I'd love to know why this won't execute as a delegate method when documentation says that it should, and I don't want to have to implement a counter to make sure my code only executes once per selection update. And for more reasons than that, implementing via delegate method is preferable to using notifications for my use case. Thanks for any help!
3
0
88
2w
Detecting Notification Banners, DND, and other screen anomalies
Is there a public method to know when an APNS has appeared on the screen? wrapping up a very high end photogrammetry app, using the front facing camera and screen illumination- incoming notifications completely throw off the math. Ideally, it would be great to turn on Do Not Disturb for the short process, but we’d settle for just the detection of the notification banner. also: extra credit - programattically adjusting Auto Dimming, and True Tone would be lovely too.
0
0
14
4w
Clarification about ANCS being unavailable
Hello, I am working on a project that involves using external device to connect over BLE with users iPhone. I would like to be able to notify users on our device about eg. incoming calls, messages etc. I have been succesfull in using ANCS to achieve that but I am a little worried around consistency of this solution, especially taking into account following line from documentation: Due to the nature of iOS, the ANCS is not guaranteed to always be present. As a result, the NC should look for and subscribe to the Service Changed characteristic of the GATT service in order to monitor for the potential publishing and unpublishing of the ANCS at any time. I have not been able (yet?) to find or identify circumstances when ANCS would not be avilable or would be "removed in runtime", hence would it be possible to request some guidance and clarification on the conditions when ANCS can be unavailable or removed? Thank you!
2
0
61
Apr ’25
Alternate App Icon Change Does Not Reflect in Notification Center on iOS 18.1+
When changing the app's alternate icon using UIApplication.setAlternateIconName(_:completionHandler:), the icon is updated correctly on the Home Screen and App Switcher. However, in Notification Center, the old app icon is still shown for notifications, even after the change has completed. Rebooting or change the device's language causes the correct icon to appear. This issue only occurs on iOS 18.1 and later. In iOS 18.0 and earlier, Notification Center correctly reflects the updated icon. Could you provide insights into how iOS caches notification icons and how we can force a refresh for all users?
1
0
50
Apr ’25
Alternate App Icon Change Does Not Reflect in Notification Center on iOS 18.1+
Version: iOS 18.1 and later (works as expected on iOS 18.0 and earlier) Area: SpringBoard / Notification Center / App Icon Rendering Description: When changing the app's alternate icon using UIApplication.setAlternateIconName(_:completionHandler:), the icon is updated correctly on the Home Screen and App Switcher. However, in Notification Center, the old app icon is still shown for notifications, even after the change has completed. This issue only occurs on iOS 18.1 and later. In iOS 18.0 and earlier, Notification Center correctly reflects the updated icon. - Steps to reproduce: Create an iOS app with alternate app icons configured in the Info.plist. Use UIApplication.shared.setAlternateIconName("IconName") to change the icon at runtime. Send a notification. Pull down Notification Center and observe the icon shown beside the notification. - Expected Behavior: Notification Center should reflect the updated (alternate) app icon immediately after the change. - Actual Behavior: Notification Center continues to display the old (primary) app icon. The new icon appears correctly on the Home Screen and App Switcher. Restarting the device does cause Notification Center to update and reflect the correct icon, which suggests a cache or refresh issue in SpringBoard or Notification Center. - Notes: Issue introduced in iOS 18.1; not present in 18.0. Reproduces on both physical devices and simulators. Occurs with both scheduled local notifications and remote notifications. Restarting the device updates the Notification Center icon, but this is not a viable user-facing workaround.
1
0
71
Apr ’25
Download and Store Custom Notification Sound for Playback in All App States (Foreground, Background, and Terminated)
I want to implement a feature where a custom notification sound file is downloaded from the server when the app is first launched and stored locally on the device. When a push notification arrives, the stored sound should be played in all app states, including foreground, background, and terminated (killed) state. Does anyone have an idea on how to implement this in iOS? Specifically, I am looking for guidance on: 1)Downloading and storing the sound file securely on the device. 2)Using the locally stored file for push notification sounds. 3)Ensuring the sound plays correctly in all states, including when the app is not running.
0
0
44
Apr ’25
Inconsistent grouping of notifications
I'm sending push notifications to a notification extension, and within the extension setting the threadIdentifier to be the same. But I'm observing inconsistent grouping behaviour, and behaviour that changes over time. The general iPhone settings are to display notifications as a Stack, and the app settings are to show on lock screen, notification center and banners and the notification grouping is set to by app (changing it to automatic doesn't affect the behaviour below). Pushes are displayed on the lock screen grouped together, then if the device is roused and the screen swiped down to reveal the notification center then they are still grouped. So far so good. If the iphone is active then the notifications appear at the top of the screen, one by one, but in this case if there is a swipe down to reveal the notification center then the notifications are not grouped when displayed, but shown individually. But then if one waits a few minutes and then displays the notification center for a 2nd time, sometimes now they will be grouped, but sometimes not. Why are they not (always) being displayed as grouped in the notification center?
1
0
39
Mar ’25
Weather Notifications
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 ?
1
0
37
Mar ’25
What is the point of thread-id/grouping in push notifications if grouping depends upon user preferences?
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.
1
0
44
Mar ’25
WidgetKit: add new widget to bundle
Hi, I have an existing Mac app on the App Store with a couple of widgets as part of the app. I want to now add a new widget to the WidgetBundle. When I build the updated app with Xcode, and then run the updated app, the widgets list doesn't seem to get updated in Notification Center or in the WidgetKit Simulator. I do have the App Store version installed in the /Applications folder as well, so there might be some conflict. What's the trick to getting the widgets list to run the debug version?
0
0
38
Mar ’25
UNNotificationRequest set timestamp to a relative time
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
1
0
250
Mar ’25
Only the last notification is being delivered
Good morning all! We are facing a specific case dealing with push notifications to iOS devices. In my scenario: I turn off my device's internet Send multiple push notifications via server using Firebase. I turned ON my device's internet again. I only see the last push notification I sent. This is an expected scenario? There is any documentation that supports this statement? Thank you all!
1
0
293
Mar ’25
Where can I find the documentation explaining behavioral differences in notification permission request windows across different versions?
I invoked the getNotificationSettingsWithCompletionHandler method of UNUserNotificationCenter on multiple test devices. After dismissing the notification permission request dialog (without explicit denial), the returned UNNotificationSettings object showed inconsistent authorizationStatus values across OS versions: ​**iOS 18:​ Returns UNAuthorizationStatusNotDetermined ​iOS 14.2:**​ Returns UNAuthorizationStatusDenied Where can I find official Apple documentation explaining this behavioral discrepancy between system versions?
1
0
282
Feb ’25
Question About APNs Server Certificate Update and Firebase Cloud Messaging
Hi, Regarding the announcement about the Apple Push Notification Service (APNs) Server Certificate Update, I wanted to clarify whether it will impact my app’s push notification setup. I use Firebase Cloud Messaging (FCM) to send push notifications to iOS devices, and in my Firebase project settings, I have configured an APNs Authentication Key under the Apple app configuration tab (Firebase Console > Project Settings > Cloud Messaging > iOS app configuration). The authentication key I am using was generated from Apple Developer > Certificates, Identifiers & Profiles > Keys. Since I am using this authentication method instead of APNs certificates, are there any changes I need to be aware of due to the APNs server certificate update, and do I need to update anything in my current configuration to ensure push notifications continue to work? Thanks in advance!
1
0
881
Feb ’25