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

153 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Can't get forum notifications to work in Safari
Every time I visit these forums, a banner is displayed at the top asking me to opt-in to notifications. I click "opt-in," the banner disappears, and no notifications are sent. If I visit my forum profile, it says my browser isn't allowing notifications: If I look in Settings->Websites, in the list of "These websites have asked for permission to show alerts in Notification Center," there are no apple.com websites whatsoever, including developer.apple.com. "Allow websites to ask for permission to send notifications" is checked, and I have many other websites in that list. I consider this to be a bug in Safari, but maybe it’s an issue with the forum itself (although I doubt it). I've submitted a Radar for it, but haven't heard anything back (I never do). EDIT: I realize I should've put this in another category, but it won't let me change that now.
0
1
128
1w
Does Firebase Push Notification Service Need New Certificates Due to APNs Update
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!
1
2
2.1k
2w
Xcode16.1&iOS18.1.1 Debugging App, unable to respond “didRegisterForRemoteNotificationsWithDeviceToken” delegation
I am an iOS development engineer. Recently, I updated the Xcode version to 16.1 (16B40) and updated my debugging device (iPhone 15) to iOS 18.1.1. However, I found that I could not respond to the delegate method. I confirmed that my code, certificate, Xcode settings, and network environment had not changed. Simply executing application.registerForRemoteNotifications() in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool did not receive a response(didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotificationsWithError ). In the same environment, when I switched to another device for debugging (iOS 17.0.3), the delegate method would respond. I really don't know what to do, I hope someone can help me, I would be very grateful. Please note: Everything is normal when using devices before iOS 18.1.1 version
2
0
175
2w
Notifications on iOS sourced from a machine on an offline local network
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?
9
0
229
1w
Notification Received in Kill Mode but No Method Invoked in iOS
Hello Apple Developer Team, I am facing an issue with remote notifications in my iOS app. When the app is in a terminated (kill) state, notifications are successfully received by the device, but none of the app's handlers (like _firebaseMessagingBackgroundHandler in Flutter) are invoked. This is impacting our ability to process silent notifications or perform background tasks reliably when the app is not running. Steps to reproduce: Send a remote notification with content-available: 1 in the payload. Confirm the notification is received by the device while the app is in kill mode. Observe that no background or foreground notification methods are triggered in the app. Expected Behavior: The app should invoke the background handler to process the notification payload, even in a terminated state. Observed Behavior: The notification is delivered to the device, but no app-level processing occurs because none of the methods are triggered. Can you please confirm if this is the intended behavior due to iOS limitations, or if there is a configuration or alternative solution to allow background handlers to execute in such scenarios? Any guidance or clarification would be highly appreciated. Thank you!
1
0
174
Nov ’24
Critical alert delay
I am sending push notifications to the app with critical alerts, but there is a significant delay. If the number of target devices is 1000 or less, notifications will be received normally within a few seconds to a minute. Once the number of target devices exceeds 1000, some devices will arrive quickly (normally within a few seconds to 1 minute) and others will arrive late (3 minutes to 15 minutes, divided into hundreds of items). In severe cases, notifications to more than 80% of devices will be delayed. Example: If you send 3000 notifications at once,  1 minute: Notify 400 items  5 minutes: Notify 1000 items  10 minutes: Notify 1000 items  13 minutes: Notify 600 items *The timing of 5 minutes, 10 minutes, and 13 minutes changes every time and is not at regular intervals. We understand that according to the push notification specifications, sending several thousand messages at once is not a problem. Please let me know if there is a rule, such as sending 1000 items at a time, in order to deliver quickly and with minimal delay.
3
0
222
Nov ’24
Difference between Push delivery metrics in APNs console vs. 410 code for unregistered tokens
Hi there, We’re using APNs Push delivery metrics, which provide a breakdown including metrics like Received by APNs, Delivered to Device, and Discarded - Token Unregistered. To track unregistered tokens on our end, we also monitor the 410 error responses from APNs, which typically indicate that a token is no longer valid. However, we’ve noticed a discrepancy: the number of 410 errors we receive is much lower than the Discarded - Token Unregistered count shown in the APNs console. Is this difference expected? Specifically, does APNs sometimes know that a token is unregistered but still return a success status to us when we attempt to send a push to that token? Thank you for any insights you can provide!
1
0
258
Nov ’24
notificationclick event not triggered if the progressive web app(pwa) is not opened
Hello, notificationclick event cannnot be triggered if the progressive web app(pwa) is already opened. I have tried many methods including client.focus() clients.openWindow() client.postMessage() message event listening Delayed message queue (to let the client being opened) preventDefault() in notificationclick event Activation event.waitUntil() The situation is that when the device install the pwa twice, the second pwa works normally. However, it is nonsense to ask users install the pwa twice. Is it a bug in Webkit and will it be fixed in the future? is there a workable example? Background: using web-push, iOS 17/18 Thanks a lot
0
1
236
Nov ’24
Help Needed: Repeated Local Notifications for Alarm App When App is Closed
I am currently developing an alarm app, and I’ve noticed that apps like Super Alarm and Alarmy are able to send local push notifications every 3 seconds after a specified time, even when the app is completely closed and in Airplane Mode. The notifications continue until the user opens the app. I’m trying to implement this functionality, but I haven’t been able to figure out how. Could anyone provide guidance on how to achieve this?
1
0
223
Nov ’24
APN's not delivering to macOS devices
Hello, I am building a swift macOS app and have noticed issues today with delivering APN's to both development and production devices. Similar to this thread the only way I can get them to deliver temporarily is to do one of: Change the bundle ID of my app to a new bundle ID, then start it up. I will usually get the first notification. Reset my network (either wired ethernet or wifi, typically both) Using the push notifications console for development sends, I see the message "discarded as device was offline" in the delivery log even though the device is still online and was just registered when I got back the deviceToken. If I set an expiration on development notifications then the delivery log says "stored for device power considerations" and the notification will then send once I do one of the above steps (new bundle or reset network). Previous to today the notifications were sending immediately and I had no issues getting them. Is there something I can do to fix this problem, is it a problem with the APN provider, or is it something else I haven't thought of? A unique ID for an expiration-based notification is 1755def8-1a44-cbcf-c64b-64e435c30f81, and a non-expiry is d7a72b46-0c64-4500-0abc-3734f9efbd90.
3
0
230
3w
safari push notification endpoint always empty
Hi, I implemented push notifications on my PWA, and it work fine with all browsers except with Safari. I followed all the recommendations given by Brady Eidson in this video : Meet Web Push for Safari And the result is that all the push notification process work fine with others browsers, from the subscription to the notification delivery and display. But with Safari the endpoint is always empty and I do not understand why. No error is triggered during subscription. Just the result is a subscription with an empty endpoint. I have the same result on iPad, iPhone and iMac. Everything is working well with others browsers or with android smartphone. But contrary to what Brady Eidson promised in his video, it does not work with Safari.
3
0
259
Nov ’24
Regression: iOS 18.2 heavy delay of local push notifications (even time sensitive notifications)
Hello! I am working on an app that requires to send a local push notification to the user from an app extension (from the ShieldActionDelegate to be precise). This is suggested by DTS as a workaround for this issue: https://forums.developer.apple.com/forums/thread/766644 But now, on the iOS 18.2 beta, local push notifications are delayed by up to 10 seconds, even though the push notification is classified as .timeSensitive, leading to a very bad user experience (where to user has to sit and wait for the notification to arrive without knowing how long it will take). This only happens when Apple Intelligence is turned on. This had happened previously on the iOS 18.1 beta but was fixed for the final release: https://forums.developer.apple.com/forums/thread/764848 But now the issue came back on the latest iOS 18.2 beta. I have documented the new behavior in FB15668616 Any help is appreciated!
3
3
1.1k
Nov ’24
Does Safari Web Push require a paid Apple Developer account (doubt with certificate)?
I need to implement push notifications in Safari. I already have a web app that can be added to the home screen. When researching push notifications in Safari, one of the things I found was that you don't need to be part of the Apple Developer Program to use this feature (text here). But when checking the requirements within the platforms, such as Pusher, they require a type of certificate that can only be generated with a paid account, that is, I need to participate in the Apple Developer Program. Pusher documentation: https://pusher.com/docs/beams/getting-started/web/configure-safari/ Now, I have many questions: Do I really need a paid account to issue the certificate? Can I issue the certificate via the web or only on a Mac? Do I really need this certificate?
1
0
243
Oct ’24
Actionable notifications on watchOS don't get iOS variables
I am developing an app which makes use of actionable notifications. On my code (the func userNotificationCenter function), I need to read my users from the local storage on the iPhone: let query: [String: Any] = [ kSecAttrService as String: "uio-auth", kSecAttrAccount as String: "users", kSecClass as String: kSecClassGenericPassword, kSecReturnData as String: true ] var result: AnyObject? SecItemCopyMatching(query as CFDictionary, &result) let ref = result as? Data But when the same code execute when I tap on the notification on the Apple Watch, it doesn't fetch anything. It now occurs to to me: Does it mean that when an actionable notification programmed for the iOS is displayed on the Apple Watch, it tries to access its own storage, and not the iPhone? If so, is there a nice way to pass the values to the watchOS so that when the callback for the actionable notifications run, it has then the data it needs?
0
0
221
Oct ’24
Overnight Notification Center message, "bash was prevented from modifying apps"
Wake up this morning and see this very concerning sticky message in Notification Center: bash was prevented from modifying apps It didn't say what parent program called `bash' so I clicked on the N.C. message to see if there was more information and it just disappeared (as if I had chosen to click on the X to clear the message-I wish I had taken a screenshot first). I have already sent in a request to Apple for them to give more detailed information on events like this. If there is an existing threat on a device it needs to be removed. The only thing that I know of that happened overnight was a SPAM email from "Norton Antivirus" came into my Gmail Inbox that wasn't filtered as SPAM and macOS announced it in Notification Center. I don't see anything funny in the RAW data of the email - and reported it to spamcop. Is it possible that a malicious email could contain html code that runs when it's announced via macOS Notification Center?
0
0
264
Oct ’24
`InvalidProviderToken` when trying to send push notification to second app
I am using a Key to connect my notification server with APNS in order to send out notifications to users. I have recently added notifications to a second app of mine, using the same notification server to fire off notifications for both apps. However, any notifications going to the second app return the error InvalidProviderToken, where as I get no such issues when send notifications to the first app. Everything, including the payloads, are exactly the same between the two apps, the only difference is that the device IDs are attached to different apps. Does anyone know why/how this would happen and how I can resolve it?
1
0
275
Oct ’24
Watch OS Push notification
Hey there, i created a independent Watch OS app and I configure push notification there. so on watch simulator I am able to get push notification every time. but today I test watch app to my real watch series 6 WatchOS 11. I got the permission alert I allowed it, and I am able to get the device token as well now if I try to send push notification to my real watch app I get this logs. Oct 22, 2024, 11:09:12.024 AM GMT+5 received by APNS Server Oct 22, 2024, 11:09:12.334 AM GMT+5 discarded as application was not registered why is that ? is there any body know's ? why i am not receiving remote notification on my real watch instead i get that my application is not register...
4
0
336
Oct ’24
Local notification not working with ios app installed
I have an iOS and watchOS app where both can run independently, I am not using WatchConnectivity to send data back and fourth. The issue I'm having is that if I schedule a local notification on the watch and the phone is unlocked, it will not show on the watch for about 10-15 seconds. If I uninstall the iOS app or have the phone locked, it will show immediately on the watch. To my understanding, this is somewhat the expected functionality but is there a way to bypass it? My app is a timer app and it really should not have a delay.
2
0
353
Oct ’24