I have an app available for download in the Apple App Store. The app sends local notifications, which are scheduled at the user's request once the app launches. I've recently learned that when new versions of my app are deployed and automatically update on the user's device, previously scheduled local notifications are deleted. Given my app design, the user can re-launch the app in order to re-schedule the local notifications. This is a bit of a problem, though, because part of my app's value is in reminding the user - so after requesting a local notification, the user expects to receive a local notification and then launch the app, not the other way around.
Given this, I've been exploring solutions so my app continues to function as expected (including delivering local notifications, even if the app hasn't yet been launched) after an app update. I've explored .backgroundTasks(), but they too are apparently deleted with an app update and require the app to be re-launched first to work as expected. Another solution might be to use push notifications instead of local notifications, but that seems like a very involved solution if I'm just looking to make sure that local notifications persist after an app update. I can't be the only person to have this dilemma - am I overlooking a simple solution?
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
We are developing an app that receives push notifications (via Firebase) from configured IoT devices. It is essential that when a specific type of notification is received, a sound is played continuously until the user interacts with the notification.
This behavior is crucial for alerting users to certain critical states of the IoT device.
We understand that Critical Alerts on iOS can bypass Do Not Disturb and silent mode. However, from our testing and available documentation, the sound from a Critical Alert seems to be limited to around 30 seconds.
Our question:
Is it possible on iOS to have a Critical Alert (or any other type of notification) continue playing sound until the user interacts with the notification or app? If so, could someone please point us to the appropriate documentation or APIs?
Thanks in advance for any guidance.
Recently, I attempted to use LiveCommunicationKit to replace CallKit. The goal was to explore better features or integration.
However, a major problem emerged. When the app is in the background or killed, it shows no notifications. This seriously impairs the app's communication functionality as notifications are vital for users to notice incoming calls.
And it is working well when the app is in the foreground.
When the app is in the background, when the push message received. the app get crashed with the following information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.'
Also, when I use CallKit instead of LiveCommunicationKit, the app works well in all cases.
The code is here:
LCK wrapper:
class LCKWrapper : NSObject, ConversationManagerDelegate {
var mgr: ConversationManager
var lckDelegate: LCKDelegate
var currentCallId: UUID
@objc init(handler: LCKDelegate, appName: String, appIcon: UIImage) {
self.lckDelegate = handler
var iconData: Data?
iconData = appIcon.pngData();
var cfg: ConversationManager.Configuration
cfg = ConversationManager.Configuration(ringtoneName: "ringtone.m4a",
iconTemplateImageData: iconData,
maximumConversationGroups: 1,
maximumConversationsPerConversationGroup: 1,
includesConversationInRecents: false,
supportsVideo: false,
supportedHandleTypes: Set([Handle.Kind.phoneNumber]))
self.mgr = ConversationManager(configuration: cfg)
self.currentCallId = UUID()
super.init()
self.mgr.delegate = self
}
func reportIncomingCall(_ payload: [AnyHashable : Any], callerName: String) async {
do {
print("Prepare to report new incoming conversation")
self.currentCallId = UUID()
var update = Conversation.Update()
let removeNumber = Handle(type: .generic, value: callerName, displayName: callerName)
update.activeRemoteMembers = Set([removeNumber])
update.localMember = Handle(type: .generic, value: "", displayName: callerName);
update.capabilities = [ .playingTones ];
try await self.mgr.reportNewIncomingConversation(uuid: self.currentCallId, update: update)
print("report new incoming conversation Done")
} catch {
print("unknown error: \(error)")
}
}
}
And the PushKit wrapper:
@available(iOS 17.4, *)
@objc class PushKitWrapper : NSObject, PKPushRegistryDelegate {
var pushKitHandler: PuskKitDelegate
var lckHandler: LCKWrapper
@objc init(handler: PuskKitDelegate, lckWrapper: LCKWrapper) {
self.pushKitHandler = handler
self.lckHandler = lckWrapper
super.init()
let mainQueue = DispatchQueue.main
// Create a push registry object on the main queue
let voipRegistry = PKPushRegistry(queue: mainQueue)
// Set the registry's delegate to self
voipRegistry.delegate = self
// Set the push type to VoIP
voipRegistry.desiredPushTypes = [.voIP]
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) async {
if (type != .voIP) {
return;
}
await self.lckHandler.reportIncomingCall(payload.dictionaryPayload, callerName: "Tester")
}
}
I am creating an app that uses critical messages, I have been granted this entitlement and I am adding the certificate and in the info.plist. In the app I request authorization to send messages to specific numbers. When I try the app in production from Xcode this works fine and I can send the critical messages. However, when I am using the app in the test flight the authorization does not seem to be remembered on the background. Moreover, I go to security/privacy settings and I grant permission to the selected number (I see that it only shows one number even when I have to granted, its like it removes the previous one) however when I exit the setting page the permission is reset (and therefore denied), I think this is a bug. Can you look into that. Both this removing granted permission (HIGH PRIORITY, this message can only be sent in the background, therefore the user can not grant it and why the maximum telephone number to be granted to send messages is reset also to a single one LOWER PRIORITY).
Thanks
We at Anywayanyday (Apple ID 424980622) utilize push notification technology for our users to enhance customer scenarios. Recently (after the launch of OS 18 update, end of September '24) we started to observe that our customers were not receiving notifications on devices with OS 18+.
In their systems we see that sending a message via transport has been done, but no notifications are reaching the client.
In the system it is visible that the device token is fresh and working.
Could you please tell us what steps we should take to fix the functionality of push notifications?
Thanks
I want to update my lockscreen LiveActivity via Broadcast Push Notification, but updating always fails - but ending always works.
Payload with "update" is completely ignored:
{"aps":{"timestamp":1685952000,"event":"update","content-state":{"currentSlotName":"Debug1","nextSlotName":"Debug2"}}}
Same payload with "end" works, the view is refreshed with the new content-state:
{"aps":{"timestamp":1685952000,"event":"end","content-state":{"currentSlotName":"Debug1","nextSlotName":"Debug2"}}}
Via the MacOS Console I am able to see that both events happen to end up on the device. I am sending these Broadcast Push Notifications via Apple's Push Notifications Console.
Hi,
My customer has acquired the assets of another company. We therefore need to transfer this company's app to my customer's account.
This app primarily functions using WebRTC video, which relies on APN PUSH notifications. I have reviewed the information about transferring an app from one developer account to another, particularly here: https://developer.apple.com/help/app-store-connect/transfer-an-app/overview-of-app-transfer. I understand that we need to generate a new SSL certificate that will be integrated into the app once it has been transferred.
Since users will not all update the app immediately, we will have two server certificates running in parallel for some time.
Is it allowed to send two notifications to the same iPhone, knowing that one of the two will systematically fail?
If not, what is the best practice for successfully migrating VOIP notifications?
Thank you in advance,
F. BABIN
Topic:
App & System Services
SubTopic:
Notifications
Can I using AudioServicesPlaySystemSound for play sound os system on NotificationService?
I’m testing remote push notifications on macOS, and although notifications are received and displayed correctly, my Notification Service Extension (NSE) never gets invoked.
The extension is properly added as a target in the same app, uses the UNNotificationServiceExtension class, and implements both didReceive(_:withContentHandler:) and serviceExtensionTimeWillExpire(). I’ve also set "mutable-content": 1 in the APNS payload, similar to how it works on iOS — where the same code correctly triggers the NSE. On macOS, however, there’s no sign that the extension process starts or the delegate methods are called.
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
override func didReceive(_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
let modified = (request.content.mutableCopy() as? UNMutableNotificationContent)
modified?.title = "[Modified] " + (modified?.title ?? "")
contentHandler(modified ?? request.content)
}
override func serviceExtensionTimeWillExpire() {
// Called if the extension times out before finishing
}
}
And the payload used for testing:
{
"aps": {
"alert": {
"title": "Meeting Reminder",
"body": "Join the weekly sync call"
},
"mutable-content": 1
},
"MEETING_ORGANIZER": "Alex Johnson"
}
Despite all correct setup steps, the NSE never triggers on macOS (while working fine on iOS).
Can anyone confirm whether UNNotificationServiceExtension is fully supported for remote notifications on macOS, or if additional configuration or entitlement is needed?
On December 6, 2024, I received the following email.
Does this mean that there is something that needs to be done on the app side or on the Firebase side?
Currently, in our project, we are using Firebase to set up push notifications.
If anyone knows how to deal with this or has taken any action, could you tell me what specific steps you took?
Action Required: Apple Push Notification Service Server Certificate Update
As we announced in October,
the Certification Authority (CA) for Apple Push Notification service (APNs) is changing.
APNs will update the server certificates in sandbox on January 20, 2025,
and in production 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.
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.
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 have integrated a Notification Service Extension in my app to handle rich push notifications with images. The issue occurs on iOS 15 and iOS 18 devices—while the text content of the notification shows, the image is not displayed. However, the rich push notification works fine on other iOS versions (e.g. iOS 16, iOS 17)
I’ve tried the following steps:
Verified App Groups are the same for both the main app and the extension.
Checked the "mutable-content" flag in the notification payload.
Added a print statement in the NotificationService.swift to check if it’s running. It doesn’t appear in the Xcode logs.
I’ve tried using Attach to Process in Xcode, but nothing happens.
The app is installed on a real device, and I’m testing with push notifications when the app is in the background.
Topic:
App & System Services
SubTopic:
Notifications
requestUrl:https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test
method:Post
responseCode:200
testNotificationToken:06beba6c-7587-44f6-a4b8-f12b11db6061_1745832671126
Request environment:
①APP from: TestFlight
②Apple acount : Sandbox account
③Apple originalTransactionId: 2000000907966801
App Store sandbox server notification configuration is fine(https://*.com/v2/apple_refund_notify), I have tried many times, but have not received any notification from Apple. Is this API not working?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
App Store Server Notifications
User Notifications
AlarmKit custom sounds are universally broken in iOS 26.0 stable - instead of playing your custom sound, it plays a system error/timeout beep.
I've spent days investigating why custom sounds result in what sounds like an error beep (like when you cancel an operation or hit a timeout) instead of the actual audio file. I can now prove this is an Apple bug, not implementation error.
Evidence:
Test 1: My Implementation
Followed Apple's documentation exactly
Tried both bundle and Library/Sounds (as documented)
Result: System error beep (not my audio)
Test 2: Professional Apps
Tested ADHDAlarms (popular AlarmKit example by jacobsapps) https://github.com/jacobsapps/ADHDAlarms
Their airhorn.mp3 custom sound: same error beep (not an airhorn)
Their default sound: works perfectly
Test 3: Device Testing
Physical iPhone (iOS 26.0 - 23A341): broken
iOS Simulator: broken
Not device-specific
Files are found correctly, but the actual audio file is never played. Instead, you hear what sounds like a system error/cancellation tone.
What I've Eliminated
Not a Library/Sounds vs Bundle issue (both broken)
Not a file format issue (.mp3, .caf, .m4a all broken)
Not an implementation issue (professional apps broken too)
Not a device issue (simulator and device both broken)
Not a file size issue (5KB to 2MB all broken)
The Documentation Lie:
Apple's docs for AlertConfiguration.AlertSound.named(_:) state:
"Choose a file that's in your app's main bundle or the Library/Sounds folder"
https://developer.apple.com/documentation/activitykit/alertconfiguration/alertsound/named(_:)
Both locations are broken.
Tested on: iOS 26.0 (23A341), Xcode 26.0.1, Swift 6.2
Impact:
This affects any app trying to:
Provide personalized wake-up sounds
Use custom alarm tones
Create meditation/sleep apps
Differentiate from default iOS alarms
Current Status:
Multiple bug reports filed: FB19900024, FB18237648, FB19779004
Apple engineer claimed "fixed in latest beta" in August
Still broken in iOS 26.0 stable (September)
Workaround:
None that I know of. You must use .default sound.
For apps needing custom audio, play it with AVAudioPlayer after the alarm fires and user opens the app.
Question:
Has ANYONE gotten custom AlarmKit sounds working in iOS 26.0 stable? If so, plzzz help I'd be so grateful.
Hello Team,
We are currently experiencing an issue where some of our devices are not receiving push notifications. We are sending notifications via the Apple Push Notification portal (https://developer.apple.com/notifications/push-notifications-console/) using the following two requests. However, in both cases, the notifications are not being delivered to the devices.
Scenario 1 :
When we send a request with apns-push-type set to alert, we receive the following error.
Request :
curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: alert"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/*devicetoken*
Response:
{
"code": 400,
"message": "bad-request",
"reason": "The device token is inactive for the specified topic. There is no need to send further pushes to the same device token, unless your application retrieves the same device token.",
"requestUuid": "c4ae39b4-87e1-4269-a1e9-163f60ec0385"
}
Scenario 2 :
However, if we send the request with apns-push-type set to background, the request is processed successfully by APNs, but no notification is received on the device.
Request :
curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: background"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/*devicetoken*
Response:
Getting a message that The notification sent successfully but no notification is received on the device.
In both cases (with alert and background push types), the push notification does not reach the device.
Additionally, when we validated the device token using the APNs Device Token Validator, it appears to be valid and returns the following message.
"Device Token is valid for sending Alert & Background push-type notifications in the Production environment"
Affected Device:
macOS version : MacOS 15.3.1
Processor : Apple M1
Could you please assist me in resolving this issue?
Thanks
i got some problem for the LiveAcitvity when i start it with notification.
The LiveActivity can not show,but it can work when i update or end a LiveActitvity;
And so,i think my configeration is right like the code;
thanks in advance
We operate a social network application, SportsYou with over 3 million monthly active users and are experiencing significant issues with push notification delivery through APNs.
We have a large number of users reporting they are not receiving push notifications. Our infrastructure uses AWS SNS integrated with APNs to deliver notifications. However, AWS CloudWatch consistently reports successful delivery (Success response), even though users confirm they never received the notifications.
Because we receive success responses from AWS SNS, our system does not attempt to recreate or refresh the device endpoints. This leaves us unable to detect or recover from these delivery failures automatically.
This issue is widespread and inconsistent. It affects users across multiple variables including different iOS versions, different device models, and different versions of our application. We cannot identify a clear pattern that would help us isolate the root cause.
With millions of active users, even a small percentage of delivery failures represents thousands of users experiencing a degraded service. This is significantly impacting user engagement and satisfaction.
We need guidance on how to properly diagnose this issue and ensure reliable notification delivery to our users. Specifically, we'd like to understand why we're receiving success responses when notifications aren't being delivered, and what steps we can take to detect and prevent these failures.
Regarding the latest news from apple below. I am not able to understand what exactly needs to be done. I can download RSA certificate from the link given but to include it in Trust store is something i am not able to get.
can someone help me out here?
" The Certification Authority (CA) for Apple Push Notification service (APNs) is changing. APNs will update the server certificates in sandbox on January 20, 2025, and in production on February 24, 2025. All developers using APNs will need to update their 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."
Hi all,
We’re implementing in-app subscriptions in our iOS app using App Store Server Notifications V2 in the production environment.
Everything is generally working well — we receive notifications such as DID_CHANGE_RENEWAL_STATUS, CANCELLATION, etc., and we log all incoming notifications into our own database.
However, we've encountered a single case where the INITIAL_BUY notification was not received for a specific user.
Interestingly, we did receive the later notifications (DID_CHANGE_RENEWAL_STATUS and CANCELLATION) for that same user.
Here is our setup:
App Store Server Notifications V2
Notification endpoint is stable and functioning normally (receives and logs other notifications)
Notifications are reliably stored in our database
The issue occurred only once for one user
Environment: Production
We've already contacted Apple Developer Support, but were informed that this issue is out of scope for direct support, and were directed to the Developer Forums.
Our questions:
Under what conditions might the INITIAL_BUY notification fail to be sent or delivered?
Is there any known behavior or scenario where Apple may skip the INITIAL_BUY notification?
Any recommendations on how to further investigate or verify whether it was sent from Apple’s side?
We’ve confirmed that the notification never hit our server (no logs, no DB record), and our system was healthy at the time.
Any insight would be greatly appreciated. Thank you!