Notifications

RSS for tag

Learn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.

Notifications Documentation

Posts under Notifications subtopic

Post

Replies

Boosts

Views

Activity

Alarm.Schedule.Relative gets scheduled to next day if too close?
Hi there, Thank you for the framework 🙏 if I use Alarm.Schedule.Relative with Alarm.Schedule.Relative.Time(hour: hour, minute: minute) and Alarm.Schedule.Relative.Recurrence.never it seems like there is some (odd?) limit where alarm will get scheduled to next day if too close? For example, lets say the current time is 12:00 PM, if I schedule alarm for 12:02 PM, it will schedule it for next day, while if I do 12:05 PM it will work as expected. Is that expected? If yes, what's the behavior and is that documented anywhere? I would expect any alarm thats scheduled in the future to fire for the current day (maybe if it's only 1 minute it gets tricky). One problem is also that even if the framework says an alarm is scheduled, I don't have access to the "next alarm date"? I wish I did as otherwise I have to compute it (by "guessing" the AlarmKit calculation) if I want to do anything with that date. Honestly, sometimes I think I am just going crazy when the alarm doesn't fire, but there SEEMS to be some odd behavior around this? (of course, feel free to correct me on anything - I could be missing documentation or not understanding something)
3
0
134
Aug ’25
Timestamp with 410 error code
Docs mention the following about the timestamp field returned by APNs: "The time, represented in milliseconds since Epoch, at which APNs confirmed the token was no longer valid for the topic. This key is included only when the error in the :status field is 410." We would like to clarify whether this timestamp is subject to the fuzzy schedule or whether it represent the accurate time of when APNs knew that the token became invalid? We understand that using 410 for tracking purposes is off label. However we still would like to have the most accurate information in regards to when token became invalid. This will help us debug user issues better in cases when they re-install, uninstall, change permission settings, etc.
1
1
146
Aug ’25
Push Notification Delivery Delays and Failures on iOS Devices
I am experiencing an issue with push notifications on my iOS application. The issue is as follows: On Android devices, push notifications are received immediately without any problems. On iOS devices, the behavior is inconsistent: When the app is in the foreground, notifications are received immediately. When the app is in the background or in recent apps with a significant delay of 5–10 hours, push notifications are not received at all. This behavior creates a major challenge for us, as timely notifications are critical for our app’s functionality. We have already verified the following points on our side: Push notification certificates and APNs setup are correct. Payload and server configurations are valid, as notifications are working fine on Android. No restrictions from the server-side, since Android users receive notifications instantly. It seems the issue is specifically related to iOS devices or APNs delivery. Could you please help us identify the cause and provide guidance on how to resolve this?
2
0
200
Aug ’25
Alarmkit custom sound plays once
When setting a custom sound in AlarmKit, the alarm only plays the audio file once. I can understand why push notifications would play a sound only once, but I don’t understand why alarms can only play the sound for less than 30 seconds. We’re already at beta 6, so I’m wondering if Apple still hasn’t fixed this or if they have no intention of fixing it.
5
2
546
Aug ’25
Questions for AlarmKit
We are so interested in AlarmKit which is presented at WWDC25. While we planning our app using AlarmKit, We had a few questions come to mind and were hoping you could provide some clarity. Please excuse the rather long list of questions, as we don't currently have a device available to test these features ourselves. System Actions Related Is there a limit to the number of alarms that can be scheduled using AlarmKit? Are alarms scheduled with AlarmKit persistent across device reboots? When an alarm is dismissed (either by swiping or pressing the power button), can our app detect this action and execute code in response? Can we control the behavior of the physical Lock Screen buttons when an AlarmKit alarm is active, for instance, to trigger a snooze action? Does AlarmKit function correctly during Do Not Disturb or Low Power Mode? What is the expected behavior when an alarm from our app (using AlarmKit) overlaps with an alarm from another app that also uses AlarmKit? Which one is going to get its priority? Thank you for your help. Sincerely
1
0
174
Aug ’25
AlarmKit FAQ
Here are some questions we received and answers: Q1: Is there a limit to the number of alarms that can be scheduled using AlarmKit? There is no set number as a limit, but this does not mean you can schedule a limitless number of alarms. Depending on device state, available resources, etc., the device may impose a limit, and restrict an app trying to schedule too many alarms simultaneously. When you hit a limit and not able to schedule more alarms, you will receive the maximumLimitReached error. Q2: Will the scheduled alarms persist after system or app events that may terminate an app, for example, a reboot, force quit, or app crash? Yes, all alarms are expected to persist regardless of app or device state changes, once they are successfully scheduled. Q3: Will alarms work if scheduled by an app that is hidden, or requires a passcode or Touch ID/Face ID to launch? Hidden or passcode required apps do not work with AlarmKit. Currently, any scheduled alarms by such apps will silently fail. Q4: When an alarm is dismissed (either by swiping or pressing the power button), can an app detect this action and execute code in response? What about force closed apps? When an alarm is dismissed, the stopIntent set in the AlarmConfiguration is called. Any code in the perform method of this AppIntent would execute. Q5: Is there a focus mode that AlarmKit cannot break through? No. AlarmKit alarms can break through all focus modes. Q6: What is the expected behavior when alarms from multiple apps overlap? Which one gets priority? Which alarm would get activated when multiple alarms are scheduled for the same time is non-deterministic. There is no way to guarantee which app or which alarm will "win". Q7: What do pressing the physical buttons do when an AlarmKit alarm is active? Any physical button that causes a reaction from AlarmKit will stop the currently alerting alarm. Q8: If there are multiple alarms active at one time, which ones do physical buttons interact with? Pressing a physical button will dismiss all currently alerting alarms Argun Tekant /  DTS Engineer / Core Technologies Change History: 2025-08-15: First posted
0
0
278
Aug ’25
pushkit and callkit
I am currently implementing VoIP push notifications in my iOS app using PushKit. On iOS 18, I am able to receive VoIP notifications successfully when the app is in the foreground. However, when the app is in the background or in a terminated (kill) state, the notifications do not arrive. In earlier iOS versions, my existing implementation worked as expected across all app states. This issue seems to have started after testing on iOS 18, which appears to have introduced stricter permission or background execution requirements. Questions: Has iOS 18 introduced new permission requirements or entitlements for VoIP push notifications? Do I need to explicitly request a new type of user permission for VoIP notifications? Are there additional background modes, Info.plist keys, or PushKit changes required for VoIP to work in background and terminated states on iOS 18? Additional Information: . Foreground: Works fine, pushRegistry(_:didReceiveIncomingPushWith:for:completion:) is triggered. . Background/Terminated: No call to the above delegate method. . Using correct voip push type in the payload. . PushKit is configured in AppDelegate. . Background modes for "Voice over IP" and "Background Processing" are enabled. . Using a real device with iOS 18 for testing (not simulator). Any guidance or updated documentation references for handling VoIP pushes in iOS 18 would be greatly appreciated.
1
0
183
Aug ’25
Push notifications were not successfully delivered and have bad status
Hello everyone, I have been working on a macOS app that utilizes push notifications for the past year. Up until recently, everything was functioning correctly. However, now I'm experiencing issues where push notifications are either not being delivered at all or are experiencing significant delays, sometimes up to 10 minutes. Setting the priority header to 10 hasn't made any difference. I am currently using development push notifications, but the issue persists when switching to the production environment. I'm curious if anyone else has encountered similar problems. When checking the push console, it frequently reports that the device is offline, even though it's actually online ("discarded as device was offline"). Occasionally, notifications are delivered promptly, but this is becoming increasingly infrequent. This issue has been consistently reported by our testers, particularly after they updated to macOS Sonoma. Any insights or assistance you can provide would be greatly appreciated.
17
8
5.1k
Aug ’25
APNs Auth Key download error after revoking old key — “already downloaded” for new key
I created an APNs Auth Key in the Apple Developer portal and downloaded it successfully once. Later, due to some issues, I revoked that key. After that, I created a new APNs Auth Key. The download button appears, but when I click it, I get the message: "Auth Key can only be downloaded once. This auth key has already been downloaded." This is incorrect because: The key is newly created in my account. I have tried multiple browsers (Safari, Chrome), private/incognito mode, and even a different laptop. I have no other active APNs Auth Keys in my account. Without this .p8 file, I cannot configure push notifications for my iOS app (using Firebase Cloud Messaging). This is blocking my production release. Has anyone else experienced this? Is there a way to reset or force a fresh APNs Auth Key when this happens?
5
3
297
Aug ’25
CarPlay notifications unsupported for Driving Task apps in iOS 18.6
I have my app configured as a Driving Task app with the entitlement and provisioning profile correctly set up. I am also requesting the ".carPlay" notification authorization option and setting up the carplay notification category with the ".allowInCarPlay" category, both without error. When testing with the iPhone and carplay simulators the user notifications I send are appearing on the phone but not in carplay. When I check the notification settings with UNUserNotificationCenter.current().getNotificationSettings() I see that carplay is shown to be not supported ("carPlaySetting: NotSupported"). The CarPlay Developer Guide 2025-06-09 (which is the version currently referenced in the Apple docs) states that "Starting in iOS 18.4, notifications are also supported in CarPlay driving task apps". Has this discrepancy been addressed anywhere, or is this an open issue? My software versions: MacOS: Sequoia 15.6 XCode: 16.4 iPhone Simulator: iPhone 16 with iOS 18.6
2
0
84
Aug ’25
How can notification action buttons' text be center aligned?
The iOS documentation shows notification actions buttons with the text center aligned: https://developer.apple.com/documentation/usernotifications/declaring-your-actionable-notification-types But there's no apparent way for an app to control this. The buttons are controlled and rendered by the system and the text is always left aligned. Is there some way to get the text center aligned?
1
0
62
Aug ’25
Inquiry About Push Notification Behavior After App Transfer
We are in the process of transferring our app to a new Apple Developer Organization account. Our app uses the Apple Push Notification service (APNs) with a .p8 authentication key configured on our server to send push notifications. We would like to confirm: Once the app transfer is completed, will push notifications continue to work temporarily using the existing .p8 key on our server, until we generate and configure a new .p8 key under the new organization's account? Understanding this behavior is critical for us to ensure a smooth transition and avoid any disruption in push notification delivery for our users. Thank you for your guidance and support.
2
0
107
Aug ’25
Problem receiving Remote Notification in the background after Review Rejected
I created an app. One if its functionalities is receive Remote Notification in the background, while app is monitoring Significant Location Changes (SLC). This functionality worked fine. I was receiving these notifications correctly. Sometimes instantly, sometime with small or large delay. And then I send the app for review. It was rejected with 3 remarks: The app or metadata includes information about third-party platforms that may not be relevant for App Store users, who are focused on experiences offered by the app itself (I wrote that app communication works both for iOS and Android.) The app declares support for audio in the UIBackgroundModes key in your Info.plist but we are unable to locate any features that require persistent audio. EULA (End User License Agreement) is missing for in-app purchases. After the rejection the app is no longer receiving these notifications. They are there, since the app receives them, when I open app, or significant location change is detected. It also works, when I run the app directly from Xcode (in debug mode), not from TestFlight nor in Sandbox. It seem to me like Apple somehow spoiled my background capabilities on purpose or accidentally. Is it possible? What can I do with it? Is it the case that I should just fix the review remarks and send the app back to review, and once the app passes it, it will work again? Or should I not count on it? Any suggestions? I asked Apple using: https://developer.apple.com/contact/topic/#!/topic/select but so far no response.
2
0
152
Aug ’25
Inconsistent VoIP Push Behavior Post Network Restoration
We are observing unexpected behavior in Apple Push Notification Service (APNS) delivery and would appreciate clarification and guidance. Below is a detailed breakdown of the scenario and related questions. Abbreviations: APNP – Apple Push Notification Provider APNS – Apple Push Notification Service Scenario: User1 is registered on iOS device1. Flight Mode is enabled on iOS device1. User2 initiates a call to User1 (Time t = 0 sec). User2 cancels the outgoing call after 5 seconds (Time t = 5 sec). Flight Mode is disabled on iOS device1 after 20 seconds (Time t = 25 sec). Observation: iOS device1 displays an incoming call notification (CallKit UI) after flight mode is turned off, despite the call being cancelled by User2. This notification disappears automatically after approximately 8–10 seconds. Logic Flow: At time t = 0, our APNP sends a VoIP push (priority) to APNS for the incoming call. Since device1 is in flight mode, APNS cannot deliver the push. At t = 25 sec, after flight mode is turned off, APNS delivers the cached VoIP push to device1. The app takes ~5 seconds to initialize (CSDK setup, SIP registration, etc.). It eventually receives a SIP NOTIFY with state="full" and empty dialog info (indicating no active call). Consequently, the CallKit incoming call is removed after ~8 seconds. Questions: → We set the apns-expiration header to 0, expecting that the VoIP push would not be delivered if the device was unreachable when the push was sent. However, APNS still delivers the push 20–30 seconds later, once the device is back online. Q. Why is the apns-expiration header not respected in this case? → Upon receiving the VoIP push, we require ~10–12 seconds to determine if a visible CallKit notification is still relevant (e.g., by completing SIP registration and checking for active dialogs). Q. Is it acceptable, per Apple guidelines, to intentionally delay showing the CallKit UI (incoming call) for 10–15 seconds after receiving the VoIP push? → Apple documentation states that the priority VoIP push channel should be used only for notifying incoming calls, while regular (non-VoIP) pushes should be used for other updates, including call cancellations. Q. What is the rationale behind discouraging the use of the priority VoIP push channel for call cancellation events? In some cases, immediate cancellation notification is as critical as the initial incoming call. Would Apple consider it acceptable to occasionally use the priority VoIP channel for rare call-cancellation scenarios without risking throttling or suspension? → In our implementation, we send an incoming call notification via the priority VoIP channel. Shortly after, we send a call cancellation notification on the regular push channel, marked with "content-available": 1. We expect this regular push to wake the app (triggering application:didReceiveRemoteNotification:fetchCompletionHandler:), but in practice the app never wakes, and our debug logs inside that delegate method never appear. Q. Under what exact conditions does a "content-available": 1 regular push fail to wake the app when it follows a VoIP push? Are there additional requirements (e.g., background modes, rate limits, power optimizations) that could prevent the delegate from being called? → According to Apple documentation: “APNs stores only one notification per bundle ID. When multiple notifications are sent to the same device for the same bundle ID, APNs keeps only the latest one.” However, in our tests: If a device is offline when APNs receives both: (a) a priority VoIP push for an incoming call, (b) a regular push for call cancellation (same bundle ID), Upon the device reconnecting, APNs still delivers the earlier VoIP push, instead of discarding it and delivering only the most recent (cancellation) notification. Q. Why doesn’t APNs replace the queued VoIP push with the newer regular push when both share the same bundle ID? Is this expected behavior due to channel type differences (VoIP vs. regular), or is there a way to ensure that the latest notification (even if regular) supersedes the earlier VoIP push? We’d appreciate your input or recommendations on handling such delayed pushes and any best practices for VoIP push expiration handling and call UI timing.
0
1
78
Aug ’25
Abnormal Fluctuations in APNs API Response Success Rate (July 15-30)
Observations​​: When our app calls the APNs API for push notifications, we observed significant fluctuations: July 15-25​​: The success response volume ​​increased by 20%​​ compared to the baseline before July 15. ​​After July 25​​: Success rates returned to baseline levels. July 30​​: Success response volume ​​decreased by 10%​​ compared to the pre-July 15 baseline. ​​ Excluded Factors​​: No changes in target audience size or characteristics (business factors ruled out). Server logs confirm consistent API request parameters and frequency. ​​Key Questions​​: Were there any ​​adjustments to response metrics​​ (e.g., success status code definitions) during this period? Have other developers reported similar issues? Were there server-side configuration updates or known incidents on Apple’s end?
2
1
215
Aug ’25
iOS App not able to get VoIP push notification when device is powered on, After opening App VoIP push receiving
When User restarted iOS device, after powering on iOS App is not able to get VoIP push notification. If user opens App, immediate VoIP push receiving. In Normal (App Kill or Background state) everything works as expected. Issue is when device is powered on and immediately( In 1-2 mins) try to call on device. We are using delegate to show Call to User public func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void)
3
0
178
Jul ’25
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.
7
0
196
Jul ’25
Device token not being extracted - iOS app registered for push notifications but callback methods not called
Background: The project was created in Xcode 5, then recreated in new Xcode. Before migration, push notifications worked without issues, after migration device token stopped being extracted. Problem: iOS app registers for push notifications, but didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotificationsWithError methods are not being called. Current situation: App is registered for push notifications (isRegisteredForRemoteNotifications = true) Notification permissions are granted Entitlements are configured correctly (aps-environment: development) Bundle ID: com.autoserviceonline.app Team: BUSINESSVISION COMPANY, TOO (NS3FSG45V7) But callback methods are not being called What I've already tried: Deleted and recreated all App IDs in Apple Developer Portal Cleared Xcode cache and derived data Created new APNs certificates and provisioning profiles Removed "ghost" certificate from Keychain Access Problem persists Additional information: Also noticed that Push Notifications Console opens non-existent project "BV.TestSwiftData" with Personal Team instead of current corporate App ID com.autoserviceonline.app. These issues might be related to project migration from old Xcode. Request: Why iOS doesn't call callback methods for device token, although registration was successful?
1
0
58
Jul ’25