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

157 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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!
0
0
26
2h
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
94
2d
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
143
1w
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
0
153
1w
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
133
1w
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.
2
0
128
1w
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
188
2w
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!
2
3
518
2w
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
164
2w
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
162
3w
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
197
4w
`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
180
4w
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
216
4w
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
259
4w
Set a repeating notification that starts at a future date
I would like to do exactly this but the API doens't seem to allow it. Was wondering if there were any creative workarounds? Basically, I have a reminder app that needs to send reminders at a certain time each day (there are several of these reminders per day). Each reminder has a couple of follow-ups scheduled at 5 min intervals. If a user takes action on the task before the reminder is sent however, I would like to unschedule that notification (and follow ups) until the next day. The unscheduling part is easy, but there seems to be no reliable way to re-schedule it for the next day and continue repeating. Looked into background tasks and they don't seem intended for these purposes nor do they seem reliable. The user isn't guaranteed to take action on notifications nor open the app within a 24-hour period after they have taken action on their task.
1
0
141
Oct ’24
Custom notification images are confused with those from other apps.
My app uses custom notifications with custom images. Why do these images get mixed up with those from other apps, causing my notifications to display images from other apps? `INImage *avatarImage = [INImage imageWithImageData:imageData]; NSPersonNameComponents *nameComponents = [[NSPersonNameComponents alloc] init]; nameComponents.nickname = content.title; INPersonHandle *handle = [[INPersonHandle alloc] initWithValue:nil type:INPersonHandleTypeUnknown]; INPerson *messageSender = [[INPerson alloc] initWithPersonHandle:handle nameComponents:nameComponents displayName:content.title image:avatarImage contactIdentifier:nil customIdentifier:customIdentifier isMe:NO suggestionType:(INPersonSuggestionTypeNone)]; INSpeakableString *speakableString = [[INSpeakableString alloc] initWithSpokenPhrase:content.subtitle.length ? content.subtitle : @""]; INSendMessageIntent *intent = [[INSendMessageIntent alloc] initWithRecipients:@[messageSender] outgoingMessageType:(INOutgoingMessageTypeOutgoingMessageText) content:content.body speakableGroupName:speakableString conversationIdentifier:identifier serviceName:nil sender:messageSender attachments:nil]; [intent setImage:avatarImage forParameterNamed:@"speakableGroupName"]; INInteraction *interaction = [[INInteraction alloc]initWithIntent:intent response:nil]; interaction.direction = INInteractionDirectionIncoming; [interaction donateInteractionWithCompletion:nil]; UNNotificationContent *_content = [content contentByUpdatingWithProvider:intent error:nil]; UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:identifier content:_content trigger:trigger]; [UNUserNotificationCenter.currentNotificationCenter addNotificationRequest:request withCompletionHandler:completionHandler];`
2
1
216
Oct ’24