Send push notifications to Mac, iOS, iPadOS, tvOS devices through your app using the Apple Push Notifications service (APNs).

Posts under APNS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

New delivery metrics now available in the Push Notifications Console
The Push Notifications Console now includes metrics for notifications sent in production through the Apple Push Notification service (APNs). With the console’s intuitive interface, you’ll get an aggregated view of delivery statuses and insights into various statistics for notifications, including a detailed breakdown based on push type and priority. Introduced at WWDC23, the Push Notifications Console makes it easy to send test notifications to Apple devices through APNs. Learn more.
0
0
1.1k
Oct ’23
New features for APNs token authentication now available
Team-scoped keys introduce the ability to restrict your token authentication keys to either development or production environments. Topic-specific keys in addition to environment isolation allow you to associate each key with a specific Bundle ID streamlining key management. For detailed instructions on accessing these features, read our updated documentation on establishing a token-based connection to APNs.
0
0
1.2k
Feb ’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
38
1d
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
46
1d
New push notifications for widgets seem too limited for actual production-level apps
I was very excited to see the addition of push notifications for widgets. However upon further inspection, the way it is implemented seems too limiting for real life apps. I have an app for time tracking with my own backend. The app syncs with my backend in the main executable (main target). My widgets are more lightweight as they only access data in the shared app container, but they don't perform sync with the server directly to avoid race conditions with the main app. I was under the impression that the general direction of the platform is to be doing most things in the main app target (also App Intents work that way for the most part), so the fact that the WidgetPushHandler just calls the widget's method to reload the timeline is very unfortunate. In an ideal scenario I also need the main app to be 'woken up' to perform the sync with the server, and once that's done I'd update the widget's timeline and where I would just read data from the shared app container. So, my questions are: What is the recommended way of updating the widgets when this push notification arrives in the case that the main app target needs to perform the sync first? Is there any way how to detect that the method func timeline(for configuration: InteractiveTrackingWidgetConfigurationAppIntent, in context: Context) was called as a result of the push notification being received? Can I somehow schedule a background task from the widget's reloadTimeline() function? How can I get the push token later, in case that I don't save it right away the first time the WidgetPushHandler's pushTokenDidChange() is called? Thank you for your work on this and hopefully for your answers. FB19356256
1
0
46
2d
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
37
2d
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
0
66
2d
[Xcode 26 beta 4] Cannot receive device token from APNS using iOS 26 simulator
Since upgrading to Xcode 26 beta 4 and using the iOS 26 simulator for testing our app, we've stopped being able to receive device tokens for the simulator from the development APNS environment. The APNS environment is able to return meta device information (e.g. model, type, manufacturer) but there are no device tokens present. When running the same app using the iOS 18.5 simulator, we are able to register the device with the same APNS environment and receive a valid device token.
3
2
71
14h
Push notifications on the iPhone simulator
I've been aware for some time that Push notifications work on the iOS simulator now -- I see them pop up while I'm working. However, it would seem that SILENT push notifications do not work. I came to this conclusion only after several frustrating hours of debugging my app, thinking either the app was broken or the server wasn't sending the notification. Finally I tested it on a device and found that it actually works fine. Why does such a limitation exist? If I can't depend on the simulator to handle ALL of the notifications, I'd rather it didn't work at all. Having it work part of the time on some notifications is really confusing.
1
0
85
6d
How to automatically set the `timestamp` field for Live Activity updates events?
I know for start events, sending the timestamp isn't required. So that's easy. However when I'm testing Live Activity using the Apple Push Notification Console. A lot of times I just need to copy/paste the payload and resend it again. But then the timestamp field needs to get updated each time, because if it's from a time in the past, then it won't trigger. This requires me to have to use an EPOCH converter to find the right time and then copy/paste it. Is there a better solution to this? I know I can use curl, but that is not in the scope of my question.
1
0
48
1w
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
35
1w
Need inputs on how to start Live activity at a specified date/time in future
Hello forum, Hope you all are doing great! We’ve implemented Live Activities in our iOS app to display live soccer scores on the lock screen. The feature generally works as expected when the app is in backgroun or app is invoked when the push is sent. However, we’re observing an issue affecting approximately 20–30% of users where the Live Activity starts successfully but no subsequent score or commentary updates are received. Upon investigation, it appears the OS is not waking the app when the Live Activity starts. This wake-up is critical for syncing the activity token with backend service we use, which is required for delivering updates. Key Points: Starting a Live Activity does not require the app to be invoked since we start with Push token However, for updates to be delivered, the app must be woken at the start to send the latest pushh token to Backend. In affected cases, even manually sending a background push does not wake the app—it remains terminated until manually opened by the user. We’d like to understand is there any other way to deliver start and updates from backend at later point when user mark a team/match favorite. Core requirement is that user need not to open the app except when marking the team as favorite. Apps like FotMob, MLB, Chrome browser doing same when team is marked as favorite and subscribed for live activities and I observed they are getting updates properly most of the times
1
0
143
1w
Clarification on Timing for Critical Alerts Approval in iOS
We are currently planning the development of an iOS healthcare application that will require the use of Critical Alerts. I understand that these notifications bypass Do Not Disturb and Silent mode, and therefore require special entitlement from Apple. We understand that Critical Alerts require a special entitlement from Apple. Could you please clarify: Do we need to request and obtain Apple’s approval for Critical Alerts before we begin development of the app? Or can we apply for this entitlement after we have a working build or prototype ready? We want to ensure compliance and streamline our development process, so any guidance on the appropriate timing for the entitlement request would be greatly appreciated.
1
0
46
1w
Live Activity "Push to Start" is received but UI never appears (Silent Crash)
Hello everyone, I'm implementing the "Push to Start" feature for Live Activities, and I've run into an issue where the activity seems to be processed by the system but never appears on the Lock Screen or in the Dynamic Island. I suspect there's a silent crash happening in my widget extension immediately after launch, but I'm unable to capture any logs or crash reports in the Xcode debugger. Here is the flow and all the relevant data: 1. The Process My app successfully requests a pushToStartToken using Activity<EJourneyLiveActivityAttributes>.pushToStartTokenUpdates The token is sent to our server. The server uses this token to send a "start" event APNs push notification. The device console logs (from liveactivitiesd) show that the push is received and the system is "Publishing event". Expected Result: The Live Activity UI appears on the device. Actual Result: Nothing appears. The UI is completely absent. 2. Device Console Logs Here are the logs from the device console, which indicate a successful receipt of the push: pushServer default 12:08:22.716353+0200 liveactivitiesd Received push event for com.wavepointer.ejourney.staging::pushToStart pushServer default 12:08:22.716818+0200 liveactivitiesd Reduced budget for com.wavepointer.ejourney.staging::pushToStart to: 7 pushServer default 12:08:22.723458+0200 liveactivitiesd Publishing event: timestamp: 2025-07-24 08:57:19 +0000; activityIdentifier: 53C3EE9D-623C-4F38-93AE-8BB807429DAA; eventType: start(...) 3. APNs Payload This is the exact payload being sent from our server: { "aps": { "event": "start", "timestamp": 1753347375, "attributes-type": "EJourneyLiveActivityAttributes", "attributes": { "journeyId": "test123453" }, "content-state": { "distanceInMeters": 1000, "depTime": 1752745104, "arrTime": 1752748704, "depStop": "Arth, Am See", "arrStop": "Oberarth, Bifang", "depZone": "571", "arrZone": "566", "co2Save": 5.0, "co2SavePerc": 44, "companyName": "WP Innovation", "countryCode": "CH", "categoryId": 5, "subcategoryId": 3, "stationStartAssoc": "Assoc1", "stationEndAssoc": "Assoc2" } } } 4. ActivityAttributes Struct To prevent decoding errors, I have made all properties in my ContentState optional and added a custom decoder. @available(iOS 16.1, *) struct EJourneyLiveActivityAttributes: ActivityAttributes, Hashable { public struct ContentState: Codable, Hashable { var distanceInMeters: Int = 0 var depTime: Int = 1752843769 var arrTime: Int = 1752843769 var depStop: String = "" var arrStop: String = "" var depZone: String = "" var arrZone: String = "" var co2Save: Double? var co2SavePerc: Int = 0 var companyName: String = "Test" var countryCode: String = "CH" var categoryId: Int = 3 var subcategoryId: Int = 4 var stationStartAssoc: String? var stationEndAssoc: String? } var journeyId: String? } What I've Tried I have carefully checked that my Codable struct matches the JSON payload. I've made all properties optional to avoid crashes from missing keys. I have tried attaching the Xcode debugger to the widget extension process (Debug -> Attach to Process...) before sending the push, but no logs, errors, or crash reports appear in the Xcode console. The process seems to terminate before it can log anything. My question is: What could cause the widget extension to fail so early that it doesn't even produce a crash log in the attached debugger? Are there other methods to debug this kind of silent failure? Any help would be greatly appreciated. Thank you!
3
1
165
1w
APNs Returning 200 OK for Uninstalled Apps
We're experiencing an issue with Apple Push Notification service where APNs continues to return 200 OK responses for device tokens belonging to uninstalled applications. Issue Details: When sending push notifications to device tokens, APNs returns 200 OK responses even for devices where our app was uninstalled more than a month ago Thanks in advanced for support
1
0
29
1w
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
78
1w
iOS 18 Sending Duplicate Push Notifications
When sending a single push notification to iOS 18 devices users receive the same notification multiple times. This issue appears specific to iOS 18 and was not observed in previous iOS versions Our server logs confirm each notification is sent only once. Notification payloads include proper apns-id values for identification and no network issues detected on our side
1
0
36
2w
Notifications not working
I’m receiving notifications from all third-party apps that I use however, most of the time there is no sound or haptics with the notification. In some cases, very seldomly I will receive a sound when a notification comes in, but that’s only with one of the many third-party apps that I use. I’ve spoken to Apple about this when this whole problem started during an update that you guys rolled out sometime between September and November 2024. They blamed it on the app programmers but I think at this point we all know that it’s Apple’s inability to accept that the problem is on their end. I never had problems receiving notifications from any of the apps prior to that. I guess my question is will Apple ever fix this or are they going to sweep it under the rug and pretend like it doesn’t exist?
1
0
215
2w
APNs Returning 200 OK for Uninstalled Apps Instead of 410 Error
We're experiencing an issue with Apple Push Notification service where APNs continues to return 200 OK responses for device tokens belonging to uninstalled applications. Issue Details: When sending push notifications to device tokens. APNs returns 200 OK responses even for devices where our app was uninstalled more than a month ago According to documentation(https://developer.apple.com/documentation/usernotifications/handling-notification-responses-from-apns), APNs should return 410 status code with JSON body for invalid tokens Expected Behavior: APNs should return 410 status code when device token is no longer valid (app uninstalled) Thanks in advanced for support
2
0
83
2w
Provisioning Profile Missing Push Notification Entitlement (com.apple.developer.push-notifications) Despite Being Enabled
I'm running into an issue during the iOS build process for my app, and I'm hoping someone can point me in the right direction. ❗ The Problem When attempting to archive the app via EAS Build (Expo), the build fails with the following error: `Provisioning profile "HCF_AppStore_ProvisioningProfile" doesn't include the com.apple.developer.push-notifications entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update.` What I’ve Already Done: Enabled Push Notifications capability for the App ID (com.rsmco.helpcreatefamilies) in the Apple Developer portal. Deleted and regenerated the App Store Provisioning Profile after enabling the capability. Confirmed the new profile is associated with the correct App ID and Distribution Certificate. Uploaded the new profile to EAS (Expo) and rebuilt the app. Yet the error persists during the Xcode archive step with Exit code 65. Additional Info: Provisioning Profile Name: HCF_AppStore_ProvisioningProfile App ID: com.rsmco.helpcreatefamilies Team: Reproductive Sciences Management Company, LLC Workflow: Expo EAS Build Capability causing issue: com.apple.developer.push-notifications
1
0
92
2w