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!
Notification Center
RSS for tagCreate 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
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?
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.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
Swift
APNS
User Notifications
Notification Center
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.
Topic:
Community
SubTopic:
Apple Developers
Tags:
APNS
User Notifications
Sound and Haptics
Notification Center
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?
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 **** 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
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.
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?
I'm building a macOS Google Chrome extension.
I need to be able to send messages from the Chrome extension to the macOS app
What's the set up flow?
I've heard about native messaging, but I struggle to implement it.
I've heard about XPC, but not sure JS can send messages to a macOS XPC service.
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
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!
Topic:
App & System Services
SubTopic:
Notifications
Tags:
App Store Server Notifications
Notification Center
User Notifications
APNS
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?
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!
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
App Store Server Notifications
Notification Center
User Notifications
As stated in other posts like:
https://developer.apple.com/forums/thread/734488
https://developer.apple.com/forums/thread/652946?answerId=823555022#823555022
Even though the recommended way from Apple documentation is to use push notifications to reload widgets timelines calling WidgetCenter.shared.reloadAllTimelines(), it is unreliable and I couldn't find a pattern of why it works 10% of times and not the other 90%.
While the debugger is connected to the App it always works though.
My widget needs to reflect updated information otherwise it becomes useless since it display smart home devices states such as the Apple Home widget does as well.
I'm having an issue on my standalone watchOS app where the settings to adjust notifications does not appear anywhere on the iPhone or the Watch. I have successfully requested notifications access from the user and have successfully displayed a local notification to them. However, if the user ever decides to revoke my notification access (or if they deny originally and want to change), the settings pane for notifications does not appear anywhere.
I've looked in the following places:
On the watch in Settings > Notifications, however it looks like you can no longer edit per app notification settings directly on the watch (none of the installed apps on my watch appear in here). The only options are settings like "tap to show full notification" and "announce notifications" which affect all notifications (Why not? Especially for apps that don't have a iPhone companion app?).
On the iPhone in the Watch app (the app you set up your watch in), in Watch > Notification. My app does not appear anywhere in there.
On the iPhone in the iPhone Settings app, in Settings > Notifications. My app does not appear anywhere in there.
On the iPhone in the iPhone Settings app, in Settings > Apps. My app does not appear anywhere in there
I've tried:
Adding capabilities in Signing & Capabilities for Push Notification, Time-Sensitive Notifications and Communication Notifications
Building the app for release instead of debug
My app also requires location access and has successfully appeared in the settings pane directly on the watch in Settings > Privacy & Security > Location Services, however notification settings do not appear anywhere.
I have created a stripped down test app to try and that also does not work. This test code successfully asks the user for permission and (from a button in ContentView), successfully schedules a notification and displays it to the user when they're not in the app. Here's the code for my NotificationManager:
import UserNotifications
class NotificationManager: NSObject, ObservableObject, UNUserNotificationCenterDelegate {
static let shared = NotificationManager()
@Published var hasAuthorisation = false
private override init() {
super.init()
UNUserNotificationCenter.current().delegate = self
requestAuthorisation()
}
func requestAuthorisation() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { authorised, error in
DispatchQueue.main.async {
if let error = error {
print("Error requesting notifications: \(error.localizedDescription)")
}
self.hasAuthorisation = authorised
}
}
}
func scheduleNotification(title: String, body: String, timeInterval: TimeInterval) {
let content = UNMutableNotificationContent()
content.title = title
content.body = body
content.sound = .default
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: timeInterval, repeats: false)
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
UNUserNotificationCenter.current().add(request) { error in
if let error = error {
print("Error scheduling notification: \(error.localizedDescription)")
} else {
print("Notification scheduled successfully.")
}
}
}
}
This issue has persisted across two iPhones (recently upgraded) and the watch was wiped when connecting to the new iPhone.
Am I missing some code? Am I missing some flag I need to set in my project somewhere? Please can someone with an Apple Watch try this code in a standalone watchOS app and see if the notifications pane appears anywhere for them? I've contacted Apple DTS, but they're taking a while to respond.
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.
Push message on the lock-screen disappears in one specific instance.
In general the situation is as follows:
the application, upon starting up, sets the badge counter (i.e. notificationCenter.setBadgeCount(3))
the application is being sent to background
the screen is locked (it doesn't matter if it's turned on or not)
send a push message to the application and set the badge (in aps) to "0"
What happens:
the screen lights up (unless it's lit up already), the push is being displayed for a very short time and gets hidden.
Happens on iOS 18.1, 18.1.1, 18.2. If not setting badge in the aps keys it works correctly.
I've created a feedback report https://feedbackassistant.apple.com/feedback/16095572. I am able to reproduce the issue on a sample app 100% of the time :/
I am experiencing heavy delays with any push notification if I have AI enabled. Authenticator takes minutes to show up, the app for the doorbell that, needless to say, requires a real-time notification, fails to deliver push notifications in time.
I have had to turn off AI in order to have a functioning phone... (I'm on a 16 Pro)
Any resolution on this?
Thanks
Hi,
With the upcoming changes to the Apple Push Notification service (APNs) server certificates — including the SHA-2 Root: USERTrust RSA Certification Authority certificate update — I wanted to clarify if we need to take any action with Firebase Cloud Messaging (FCM).
Since we’re using FCM to send push notifications to iOS devices, does Firebase also need to update its server certificates in response to these changes, or will Firebase handle the updates automatically? We understand that Apple recommends updating our Trust Store to include the new certificates for APNs, but we’re unsure if any action is needed on our end for FCM specifically.
Thanks in advance for the clarification!
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
App Store Server Notifications
Notification Center
User Notifications
We have a device which is an appliance and we are developing a control interface app for macOS and iOS/iPadOS.
How can we set up our iOS application to grab information from a local network device while it is in the background in order to show notifications?
Communication between the Apple device and our device is via local networking and the device is designed to be used on networks without internet connections. On networks with internet connections we could forward events from the device, via a server and APNS push notifications, but that isn't valid here.
Events occur on our device and are forwarded to clients, who are subscribed to Server-Sent Events. On macOS this works well and the application can receive updates and show Notification Center notifications fine.
On iOS we are using a BGAppRefreshTaskRequest with time interval set to 1 minute, but it appears that we get scheduled only every few hours. This isn't very useful as notifications just arrive in batches rather than in a timely manner. All normal networking is closed when the app goes into the background, so we cannot keep the SSE request open.
Another idea which we haven't tried yet: Creating a new endpoint on the device which keeps the connection open until a notification arrives, then using background URLSession to poll on that endpoint. Would that work? It seems like a mis-use of the API perhaps?
Topic:
App & System Services
SubTopic:
Networking
Tags:
Notification Center
User Notifications
Background Tasks