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!
Notifications
RSS for tagLearn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm facing an issue delivering VoIP push notifications to user devices. It's pretty random, sometimes notifications are delivered and sometimes not. I've had a call with the user to understand and narrow down the issue, including testing delivery of pushes to their device token via Push Notification Console as described here: https://developer.apple.com/documentation/usernotifications/testing-notifications-using-the-push-notification-console#4181180.
I asked a user to use Wi-Fi first and tried delivering around 10 pushes via console and 2 of them were lost while the rest was delivered.
I asked a user to use cellular and tried delivering also around 10 pushes and most of them were lost and only few of them were delivered.
Production environment was used to deliver pushes hence I cannot see delivery log and so I have no visibility over a reason why push wasn't delivered.
I wanted to file a code-level support ticket to get help however I need to supply a sample xcode project which in this particular case doesn't make any sense as I'm using Apple's Push Notification Console tool and it delivers pushes in some cases while doesn't deliver it in other cases.
I'm pretty familiar with all potential reasons why push might not be shown on device, including app early crashes, not reporting a call to CallKit etc. => although you never know, I'm pretty sure it's not our case.
How can I get support on investigating specific user device token delivery issues like in the case I described above? I have device token and push console records but it's not clear how to get support on that.
Thank you!
There is one xpc server and two xpc clients (clientA and clientB). When clientB sends a message to the xpc server, xpc server fills a value for dummyString in it's memory and I want clientA to know that dummyString got updated and also the new value for this dummyString. The updation of dummyString is not something that happens often.
Two options we tried:
Have a timer for 5 seconds in clientA and keep polling and request for the value of this dummyString.
Setup a darwin notification in server that gets posted whenever dummyString is being updated. clientA receives requests for dummyString value only when it observes a notification being posted.
Which of these two approaches causes the least delay for clientA to know the updated value of dummyString?
For devices running iOS 18 and iPadOS 18 or later, you can add input-push-token: 1 to your payload to start a Live Activity and receive a new push token. After you receive a new push token, you can use it to send updates to a Live Activity.
I read from https://developer.apple.com/documentation/ActivityKit/starting-and-updating-live-activities-with-activitykit-push-notifications#Start-new-Live-Activities-with-ActivityKit-push-notifications
that I can start a live activity from CUSTOM SERVER by the start token I get from MyApp.Does that paragraph means my CUSTOM SERVER can receive a new token from aps?
If not, how can update the live activity started by Push-Notification when MyApp doesn't alive?
And what "input-push-token: 1 " can do, when I put it in the payloads?
I am trying to build a chat app. I am using FCM to deliver messages to my app accompanied by some custom data like the new message_data, deleted message_id and so on; each message will need to run the app in the background to do some background processing and local database syncing.
This continuous background processing is clearly not acceptable as APNs imposes a per-device limit on background push notifications . I am asking how can I push messages and actions payload without being throttled ?
Hello,
I have the new root certificate is installed on the server (regarding "Action Required: Apple Push Notification Service Server Certificate Update"). I have switched to using sandbox environment to test if it would be working but I get error:
"reason":"BadCertificateEnvironment"
does it mean that the root certificate is not installed correctly or that is a different issue?
What could be the reason for that?
I have found that this response corresponds to "The client certificate is forthe wrong environment.", but there weren't an option to set environment on "https://identity.apple.com/pushcert/".
Is there any callback available when a/all notifications is/are removed from notification tray?
Hi,
We received the following message.
Hello, We’re reaching out with a final reminder that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs updated the server certificates in sandbox on January 21, 2025. APNs production server certificates will be updated on February 24, 2025. To continue using APNs without interruption, you’ll need to update your application’s Trust Store to include the new server certificate: SHA-2 Root: USERTrust RSA Certification Authority certificate.
Note, that we are using Firebase to deliver push notifications and the connection is done via APN keys, not certificates.
Is there anything that we need to update in the application to mitigate the risk of not delivered push notes ?
I am developing a system to send VoIP notifications to terminals with APNs.
I understand that the maximum JSON Payload for VoIP is 5kb.
If I want to send VoIP notifications to 3000 terminals, I am considering sending 3000 requests in parallel from the system to the APNs, will the APNs guarantee that the notifications will be sent to each terminal without a significant time lag when receiving 3000 requests simultaneously?
I received an email from Apple saying that I needed to replace the APNS certificate.
I am inquiring because I am curious about who has the relevant authority and who actually makes the changes.
Could you please provide specific guidance on this?
Hello,
We’re reaching out with a final reminder that the Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs updated the server certificates in sandbox on January 21, 2025. APNs production server certificates will be updated on February 24, 2025. To continue using APNs without interruption, you’ll need to update your application’s Trust Store to include the new server certificate: SHA-2 Root: USERTrust RSA Certification Authority certificate.
To ensure a smooth transition and avoid push notification delivery failures, please make sure that both old and new server certificates are included in the Trust Store before the cut-off date for each of your application servers that connect to sandbox and production. At this time, you don’t need to update the APNs SSL provider certificates issued to you by Apple.
If you have any questions, please contact us.
The Apple Developer Relations Team
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
I am developing an application that uses NetworkExtension (Local PUSH function) And VoIP(APNs) PUSH.
Nowadays, I found a problem on this app doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an APNs PUSH.
My confimation result of my app and server log is below.
11:00 AM:
my server(PBX) requests a VoIP(APNs) PUSH notification to the APNs.
But my app does not receive the VoIP(APNs) PUSH.
At this time, my app is running on LAN (Wi-Fi without internet connection), as a result, NetworkExtension was running. so I think this is normal behaviour.
14:55:11 PM:
There is an incoming call from the my server(PBX) via local net, and NetworkExtension calls iOS API(API name is reportIncomingCall).
However, iOS does not call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall.
14:55:11 PM:
At almost the same time, iOS calls the delegate cdidReceiveIncomingPushWithPayload of VoIP PUSH.
(instead of call the delegate didReceiveIncomingCallWithUserInfo for the reportIncomingCall?)
And the content of this VoIP(APNs) PUSH was the incoming call at "11:00 AM".
In other words, the VoIP(APNs) PUSH at 11:00 AM is stuck inside iOS, and at 14:55:11 PM, from NetworkExtension reports it.
I feel there is a problem on iOS doesn't handle incoming call of Local PUSH when receiving a Local PUSH after receiving an VoIP(APNs) PUSH.
Would you tell me Apple's opioion about this?
If this is known problem, Please tell me about it.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
User Notifications
PushKit
Push To Talk
What timezone is used in the CloudKit Push Notification reporting? Meaning, when I see 1,000 Sent Push Notifications on 2/18, is that 2025-02-18 00:00 through 2025-02-18 23:59 PST? EST? UTC?
The metrics shown in [the CloudKit Push Notification reporting] are not lining up with stats from my marketing system, and I'm trying to diagnose.
Also, is there a way to see DELIVERIES or just SENT? I'm looking to learn more about why a Notification would be Sent but not received by the user.
Thank you!
I received an update to the APN root certificate. Testing the connection using MDM.pem to the push environment returned the following error:BadCertificateEnvironment
ERROR
I send APNs notifications to my devices with the CloudKit dashboard. I test with two devices;
Device with Silent Push Working Successfully:
iOS version 16.5.1 (c), Model iPhone Xs
Silent Push Failed Device:
iOS version 15.3.1, Model iPhone Xr
Normal alert notifications work successfully on both devices. But I can't see any log in my project even though silent push is sent successfully on one device.
What I've Checked:
content-available is set to 1.
My app is not in kill state, it is in foreground or pending in the background.
When I send simple notifications, I can see logs in my swift project and notifications on physical devices without any problem.
No, my certificate has not expired and if there was a problem with it, I would not be able to see the normal notifications.
My phone is not in power saving mode and the “Background App Refresh” option is turned on in the app's settings.
Both devices in charging state.
App capabilities: Background Modes is enabled with Remote Notifications, Background Fetch, Background Processing.
CloudKit Dashboard After Sending Silent Push:
My AppDelegate Class In Swift Project:
import SwiftUI
import UIKit
import UserNotifications
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
if granted {
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
}
}
return true
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
let token = tokenParts.joined()
print("Device Token: \(token)")
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
print("Failed to register: \(error)")
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
logInfo("Received Push Notification: \(userInfo)")
if let aps = userInfo["aps"] as? [String: AnyObject], aps["content-available"] as? Int == 1 {
logInfo("This is a silent push notification")
//DO SOME WORK
completionHandler(.newData)
}
completionHandler(.newData)
}
}
We currently are checking to see if we need to make modifications to account for the new Certification Authority (CA) for APNs that will be changing soon. Since we currently use the newer token-based connection to APNs and not the certificate-based connection, would we be unaffected by this change?
I am developing a VoIP service.
Usually, when receiving a VoIP Push, Callkit is exposed immediately after receiving the message and the app is designed to be used.
However, there is an extremely intermittent phenomenon (not well reproduced) where the app does not wake up even when receiving a VoIP Push. And after a long time, the app wakes up and Callkit is activated. (A long time after receiving the call…)
Has anyone experienced the above phenomenon? I wonder if there are any reported parts depending on the OS version. (I have identified that it does not occur in the 17.x version, but it is difficult to guarantee because it occurs extremely intermittently)
The app is not running in the background, but... Could this be happening if there are a lot of pending operations in the background?
I need help urgently
My Mac app has a launch agent (within the app bundle) that works great without the app running. There are some occasions where I need to display an alert and ask the user to launch the app to handle the issue. I thought about using UNUserNotificationCenter but I'm not able to make it work from the agent.
I'm asking for authorization as follows:
[center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge)
completionHandler:^(BOOL granted, NSError * _Nullable error) {
NSLog(@"authorization request completion. Granted: %@, error: %@ (%@)",granted?@"YES":@"NO",error, [error localizedDescription]);
}];
And I'm trying to post the notification as follows:
content.title = @"Your App Name";
content.body = @"Click the button to open the app";
content.sound = [UNNotificationSound defaultSound];
UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:[[NSUUID UUID] UUIDString]
content:content
trigger:nil];
[center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Error showing notification: %@ %@", error, [error localizedDescription]);
}
}];
When running I'm getting asked to authorize, I authorize and all seems OK in system settings but I'm not able send any notifications. addNotificationRequest results in UNErrorCodeNotificationsNotAllowed error.
I tried this with the authorization request inside the main app, or inside the agent, with the same results.
When trying to post the notification from within the app, it does work, but that's not what I need.
Is posting notifications from within the launch agent not possible at all, or is there anything here that I'm missing.
TIA
I invoked the getNotificationSettingsWithCompletionHandler method of UNUserNotificationCenter on multiple test devices. After dismissing the notification permission request dialog (without explicit denial), the returned UNNotificationSettings object showed inconsistent authorizationStatus values across OS versions:
**iOS 18: Returns UNAuthorizationStatusNotDetermined
iOS 14.2:** Returns UNAuthorizationStatusDenied
Where can I find official Apple documentation explaining this behavioral discrepancy between system versions?
The APP was not awakened by system after start a liveactivity and the liveactivity has showed on lock screen.so the updatetoken wont send to our inner server and the liveactivity can not update,often like this,but sometimes it can work.
it makes me confuse,and i don't know how should i can do,because the liveactivity like a black box,i can not analyse the data link.for example ,inner server send a start liveactivity,but it can not accept a updatetoken unless the user lanuch APP.
i hope the liveactivity can start and update on background. And i have developed it as described in the document.
Hope to get your help,thank you very much.