User Notifications

RSS for tag

Push user-facing notifications to the user's device from a server or generate them locally from your app using User Notifications.

Posts under User Notifications tag

148 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

[iOS 26 beta] Unexpected Behavior: didRegisterForRemoteNotificationsWithDeviceToken Invoked Before User Notification Authorization on iOS 26 Beta
I'm encountering an issue with our legacy Objective-C codebase that uses UIApplicationDelegate. Here are the steps to reproduce the issue: Uninstall the application from the device. Install and launch the application. As part of the launch event, the client requests notification permission. The permission prompt is still displayed, even though the client receives a remote notification token (which appears to be a cached one). I followed the same steps with a sample app built with Swift (SwiftUI), and this issue did not occur. In the Swift app, I consistently received a delegate<didRegisterForRemoteNotificationsWithDeviceToken> call after the user allowed the notification permission. Could you please provide some insights into why this might be happening with only our client?
3
0
98
3d
Does BGAppRefreshTask require an internet connection?
Basically the title. I am trying to implement a local notification to trigger, regardless of internet connection, around 3-5pm if a certain array in the app is not empty to get the user to sync unsaved work with the cloud. I wanted to used the BGAppRefreshTask as I saw it was lightweight and quick for just posting a banner notification but after inspecting it in the console, it looks like it needs internet connection to trigger. Is this the case or am I doing something wrong? Should I be using the BGProcessingTask instead?
1
0
33
3d
Push Notifications
The following issue has occurred: Push notifications are not being received on certain devices. What could be the possible causes? Push notifications are being sent from our own server, and we are receiving normal responses from APNs. Users have confirmed that notifications are enabled on their devices, and they report no network issues. This problem is occurring for multiple users.
4
0
81
4d
Push Notifications
以下の問題が発生しています: 特定のデバイスでプッシュ通知が受信されません。 考えられる原因は何でしょうか? プッシュ通知は自社のサーバーから送信しており、APNs(Apple Push Notification service)からは正常な応答が返ってきています。 ユーザーはデバイスで通知が有効になっていることを確認しており、ネットワークの問題も報告されていません。 この問題は複数のユーザーに発生しています。
1
0
32
5d
How to track a Live Activity started via push when the app is terminated and hasn't been relaunched from long time?
Hi all, I'm currently implementing Live Activities using ActivityKit and facing a real-world limitation that I hope the community (or Apple) can clarify. 🔹 I can successfully start a Live Activity via APNs push (event: "start") even when the app is terminated — the Live Activity appears as expected on the Lock Screen and Dynamic Island. However, I need to update that Live Activity using the name I assigned in the push payload (e.g., match-123). This requires calling: Airship.channel.trackLiveActivity(activity, name: activity.attributes.matchID) …or equivalent code in native implementations to associate the activity with its push token. ❓The problem: If the user has never launched the app, or hasn't opened it after the Live Activity was started via push, then there’s no chance for the app to run this tracking code. So: ✅ Live Activity starts fine via APNs ❌ I can't track the activity and register it for future push updates (by name) until the app is launched ❌ Therefore, I can't update the Live Activity without knowing the token-name mapping 🔍 My question: Is there any way to programmatically track or associate a Live Activity (started via push) with a name for APNs updates, without requiring the app to launch? Or put differently: Can the system automatically track the name → token mapping if the activity is started via push? Is there any way (via entitlement, plist config, or system event) to allow registering the activity in the background (without user launch)? 💡 Notes: I already use pushType: .token and NSSupportsLiveActivitiesFrequentUpdates Live Activity content is fine; only the ability to send future updates is blocked without initial app launch Using Airship SDK for push + activity tracking, but the question is general to iOS + ActivityKit behavior Any insight on how apps like FotMob, Uber, or sports apps handle this situation would be really helpful! Thanks in advance.
1
0
148
6d
Is it possible to programmatically set macOS notification preferences for an app in Swift?
Hi, I’m working on a Safari extension for macOS, and I’d like the app to use specific system notification settings right after installation. I’m wondering if there’s a way in Swift to programmatically configure the default notification preferences (as seen in System Settings > Notifications > [my app]). Here are the desired settings: Only Desktop – without “Notification Center” or “Lock Screen” Alert Style: Temporary Badge App Icon: Enabled Play Sound for Notifications: Disabled Show Previews: When Unlocked Notification Grouping: Off (I don’t want them to accumulate in Notification Center) Here is the code I’m currently using to display a basic notification: private func handleNotificationRequest(_ message: [String: Any]) { guard let title = message["title"] as? String, let body = message["body"] as? String else { return } UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { granted, error in if granted { self.showNotification(title: title, body: body) } } } private func showNotification(title: String, body: String) { let content = UNMutableNotificationContent() content.title = title content.body = body content.sound = nil // No sound for subtle notification // Create notification that doesn't persist in notification center let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 0.1, repeats: false) let request = UNNotificationRequest(identifier: "fast-url-copy-notification", content: content, trigger: trigger) UNUserNotificationCenter.current().add(request) { error in if let error = error { os_log(.error, "Failed to show notification: %@", error.localizedDescription) } } } OS: macOS 26.0 Thanks in advance, Mateusz
1
0
377
6d
PushKit with CallKit - CallKit not shown when app is in background or terminated
Hi team, I am developing VOIP feature using PushKit and CallKit but CallKit is not show when app in background or terminate state, now in foreground state I can call reportNewIncomingCall from pushRegistry-didReceiveIncomingPushWith and it's work as expected but the problem is in background or terminate state it's not my setup: PushKit is configured In Signing & Capabilities I add background modes (Remote notifications and Voice over IP) In info.plist I add <key>UIBackgroundModes</key> <array> <string>voip</string> I'm not sure should I create new VOIP Certificate but now I can receive message notification normally. Any help or suggestions would be greatly appreciated Thank you
1
1
61
6d
didReceive isn't called in CarPlay scene
I have set up an iOS application with CarPlay scene using carplay-driving-tasks entitlement. And as per latest policy changes I'm able to get push notifications in the CarPlay screen. But unlike from phone scene, when I tap on a notification from CarPlay I don't get a trigger on didReceive method to intercept the payload of the notification that user tapped on. Is there any other ways or configuration needed to get this working? I just need to get the payload and present an Alert template within the CarPlay when user taps on a CarPlay notification and the app opens.
0
0
22
2w
Notification Service Extension and the main thread
Question, if I am writing async code in the notification service extension, I understand it terminates after 30 seconds. If I want to wait until these async methods finish before calling the content handler, I believe an option I have is to use dispatch groups. However I am open to other solutions if there are better options. My question is, if I use dispatch groups, is there any issue in using the main queue here? Or does the main thread not make sense to use in the context of the NSE? dispatch_group_notify(group, dispatch_get_main_queue(), ^{ if (self.contentHandler) { self.contentHandler(self.bestAttemptContent); } }); Or is it recommended to instead use a different queue in the NSE? dispatch_queue_t nseQueue = dispatch_queue_create("com.blah.blah.nse.queue", DISPATCH_QUEUE_SERIAL); dispatch_group_notify(group, dispatch_get_global_queue(QOS_CLASS_(SOMETHING), 0), ^{ ... }); OR am I over thinking this? :) Thanks ahead of time, relatively new to iOS so just looking to learn/understand better.
3
1
209
2w
App Notifications - Audible Alert Schedule
Hi all, First time poster :) I am interested to understand if it is possible to set a notification alert within an application. I am building an application on internet connectivity health but want users to be able to choose a time when the notification is audible or silent. (appreciate you can set the device to a status where notifications are silenced) Within the application if they choose to be alerted to critical alerts, I would like them to be able to choose a time period when the alerts should be silent or when they should be audible. Who wants alert on your internet at 2am when Maintenace windows open up? Cheers Dan
1
0
120
3w
Unexpected Immediate Delivery of Multiple UNLocationTrigger Notifications
Hello, I'm encountering an issue with UNLocationNotificationTrigger in my iOS app. I've scheduled three local notifications using UNLocationNotificationTrigger, each tied to a distinct geographic region. These regions are significantly distant from one another and should not trigger simultaneously under normal movement conditions. However, during testing, the user received all three notifications within one second, despite being physically located near only one of the regions. This behavior is unexpected and defeats the purpose of using location-based triggers. Could you please clarify why this might be happening? Is there a known issue with UNLocationTrigger, or is there a possibility that iOS preemptively triggers all scheduled location notifications? Any guidance or recommended practices to avoid this behavior would be greatly appreciated. Thank you!
5
0
66
3w
Can I enable push notifications in an iOS app built from a web app URL using PWA Builder?
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.
1
0
43
3w
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
67
Jun ’25
NEAppPushProvider ios 18.4+ Push Connectivity
Did iOS 18.4 ( and 18.5) with iPhone 14 or 15 introduce new network connectivity or battery optimization policies that would break Local Push Connectivity? (suspend PushProvider in a new way that prevents it from listening and reponding to incoming messages from private network server)? We have a private app using local push connectivity for real time local alerts on a local private network & server. The current application version works on prev devices including iPhone 12, iOS 14-18.1 that we know of. A new(er) installation with iPhone 14s & 15s on iOS 18.4 is having new connectivity problems that seem to occur along with sleep. Previously NEAppPushProvider could listen and reply to incoming messages from server for local notifications, incoming sip invites, and connection health messages. We'll be performing addtional testing to narrow the issue in the meantime, but it would be VERY helpful to have clarification regarding any iOS minor patches since 18.1 that are now breaking existing Local Push Connectivity applications. If so what are the recommendations or remedies. Are known issues with Network Extensions patched in 18.5? Are existing applications expected to redesign their networking solutions for 18.3 & 18.4? Did iOS18 versions later than 18.1 begin requiring new entitlements or exceptions for private apps in app store?
2
0
39
Jun ’25
NSUserNotificationsUsageDescription only works for certain locales
I'm trying to provide custom localized descriptions for the iOS notification permission popup in my app, which supports multiple locales. To achieve this, I'm using InfoPlist.strings files per locale with the following keys: NSUserNotificationsUsageDescription NSUserTrackingUsageDescription The issue I'm facing is that NSUserTrackingUsageDescription is working correctly across all tested locales, but NSUserNotificationsUsageDescription only works for some locales. Locales tested: Working: ja, tr, fr-CA Not working: fr-BE, nl-BE In each case, the correct localized NSUserTrackingUsageDescription appears, but the NSUserNotificationsUsageDescription falls back to the default or does not appear as expected in fr-BE and nl-BE. I'm using Xcode 16 and testing on both iOS 18 simulator and physical devices, and the issue is consistent across both. Any insights on whether this is a known issue in iOS or if there are additional steps needed for NSUserNotificationsUsageDescription to localize properly would be greatly appreciated.
1
0
101
Jun ’25
Persistent iOS Signing & UIBackgroundModes Entitlement Issue
Problem Statement We are experiencing a critical and persistent issue preventing the successful signing and building of our iOS application. The core problem is that provisioning profiles, whether automatically generated by Xcode or manually created in the Apple Developer Portal, consistently fail to include the UIBackgroundModes entitlement, leading to a build failure. Specific Question Why are provisioning profiles generated via the Apple Developer Portal and/or Xcode's automatic signing process consistently omitting the UIBackgroundModes entitlement for our App ID, even when this capability is explicitly configured in Xcode? We seek guidance or backend intervention to ensure our provisioning profiles include the necessary entitlement. Expected Outcome We expect to be able to successfully build and sign our iOS application, with provisioning profiles that correctly include the UIBackgroundModes entitlement, allowing for proper implementation of remote notifications. Observed Symptoms Primary Build Error: Consistent build failure with the exact error message: "Automatic signing failed: Provisioning profile 'iOS Team Provisioning Profile: com.scott.ultimatefix' doesn't include the UIBackgroundModes entitlement." Missing Entitlement in Profile (Confirmed by Inspection): Direct inspection of downloaded .mobileprovision files (including those manually generated in the Developer Portal for com.scott.ultimatefix) consistently shows the absence of the UIBackgroundModes entry within the section of the Entitlements dictionary. The aps-environment key for Push Notifications is present, indicating Push Notifications are enabled, but Background Modes are not. Certificates Correctly Recognized in Xcode: Our "Apple Development: Stephen Criscell Scott" and "Apple Distribution: Stephen Criscell Scott" certificates are correctly displayed and recognized in both Keychain Access and Xcode's Preferences &gt; Accounts &gt; Manage Certificates window (without "Not in Keychain" status). Furthermore, the Signing &amp; Capabilities tab for the target in Xcode now correctly shows Signing Certificate: Apple Development: Stephen Criscell Scott. Persistent Issue Across Resets: The problem persists despite extensive local cache invalidation, Xcode reinstallation, and even testing in a fresh macOS user account (which confirmed the issue was not user-specific).
1
0
92
Jun ’25
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
85
Jun ’25
Request for Assistance: Safari Web Push Notification Token Expiration Issues
Dear Apple Developer Support Team, I am writing regarding critical issues we are facing with Safari web push notifications in our application iLiveMyLife.io, which is severely impacting our ability to maintain reliable communication with our users. Issue Description: We are experiencing persistent problems with Safari push notification tokens expiring or becoming invalid without any notification to our server. This creates several critical issues: Users stop receiving notifications without any indication of failure Our notification delivery system has no way to detect token expiration The expiration appears to happen frequently (seemingly almost daily in some cases) There is no reliable mechanism to re-establish push communication without users manually revisiting the app Technical Impact: Our messaging functionality becomes completely unreliable We must resort to email or SMS as fallback mechanisms, which is not feasible for a real-time communication platform This makes building any reliable messaging application on Safari practically impossible The Broader Context: What makes this situation particularly challenging is that all potential alternative browser APIs that could help address this issue appear to be deliberately disabled or restricted in Safari: Background Service Workers don't function in the background on iOS Safari Background Sync API is not supported WebSockets cannot operate when the app is closed There's no way to programmatically check the validity of push tokens The combination of these limitations creates a situation where developers have no viable technical path to build reliable notification systems for PWAs on Safari. This appears to be a systematic restriction rather than individual API limitations. Requested Information: Is there a recommended approach to detect Safari push token expiration? Are there alternative notification mechanisms for PWA applications on Safari that offer more reliability? Is there documentation on the lifecycle of Safari push tokens that could help us implement proper handling? Are there plans to improve the Web Push API implementation in Safari to address these reliability issues? Could you clarify if these limitations are intentional design decisions or technical constraints that might be addressed in future updates? Business Impact: This issue fundamentally undermines our platform's core functionality. For a collaborative tool, reliable notifications are essential - users cannot collaborate effectively if they miss updates because their push tokens silently expired. The current state creates confusion among our users, who don't understand why they suddenly stop receiving notifications. Any guidance or assistance you could provide would be greatly appreciated. We're committed to providing an excellent experience on Safari, but the current push notification limitations make this extremely challenging. Thank you for your time and consideration. Best regards, Ilya
0
0
81
Jun ’25