Hello, I am trying to utilize the Critical Messaging API to allow my user to message 1 or multiple pre registered contacts automatically.
An issue I am having with this in testing is that when the application attempts to fire off texts to the phone numbers the success rate changes from trial to trial, with no variable changing. Sometimes I can send a Critical Message to multiple phone numbers in rapid succession, sometimes the message is only sent to 1 contact, and sometimes I get no successes. Each failure always returns the MSCriticalMessaging.notSupported error.
The API documentation states, "The send(_:to:) method only works if the app is backgrounded, if it’s called from foreground the framework returns a MSCriticalMessagingError.notSupported error."
If my app is always backgrounded in these tests, what other issues may cause this notSupported error return, and why does the outcomes success rate vary?
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 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?
After porting code to Swift 6 (Xcode 16.4), I get a consistent crash (on simulator) when using UNUserNotificationServiceConnection
It seems (searching on the web) that others have met the same issue. Is it a known Swift6 bug ? Or am I misusing UNUserNotification ?
I do not have the crash when compiling on Xcode 26 ß5, which hints at an issue in Xcode 16.4.
Crash log:
Thread 10 Queue : com.apple.usernotifications.UNUserNotificationServiceConnection.call-out (serial)
As far as I can tell, it seems error is when calling
nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
I had to declare non isolated to solve a compiler error.
Main actor-isolated instance method 'userNotificationCenter(_:didReceive:withCompletionHandler:)' cannot be used to satisfy nonisolated requirement from protocol 'UNUserNotificationCenterDelegate'
I was advised to:
Add 'nonisolated' to 'userNotificationCenter(_:didReceive:withCompletionHandler:)' to make this instance method not isolated to the actor
I filed a bug report: Aug 10, 2025 at 2:43 PM – FB19519575
Topic:
App & System Services
SubTopic:
Notifications
Tags:
Swift
Xcode
Notification Center
User Notifications
I've got an app with several app extensions (call extension, action extension, notification service extension, message filtering extension, notification content extension).
If I need to interactively debug these then I can select the scheme and run the extension within Xcode for all of them except for the notification content extension, with that I get an error dialog summary saying:
Failed to install the app on the device / The provided item to be installed is not of a type that CoreDevice recognizes.
Which when expanded has the blumpf posted below.
Why can I not run the notification content extension, when I can run any other type of app extension?
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
Failure Reason: The provided item to be installed is not of a type that CoreDevice recognizes.
User Info: {
DVTErrorCreationDateKey = "2024-12-27 16:39:54 +0000";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Users/Me/Library/Developer/Xcode/DerivedData/XFinity-celiagrvtevxcagztrguseawvjkl/Build/Products/Debug.Ceq.QA-iphoneos/NotificationContentExtension.appex";
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_identifier" = "00008101-00115D623460001E";
"device_isCoreDevice" = 1;
"device_model" = "iPhone13,3";
"device_osBuild" = "18.2 (22C152)";
"device_platform" = "com.apple.platform.iphoneos";
"device_thinningType" = "iPhone13,3";
"dvt_coredevice_version" = "397.28";
"dvt_coresimulator_version" = "993.7";
"dvt_mobiledevice_version" = "1759.40.2.100.1";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 7;
"operation_errorCode" = 3002;
"operation_errorDomain" = "com.apple.dt.CoreDeviceError";
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 1;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_113575882_enable" = 0;
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 0;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_guardMalloc_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_mtc_enable" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_enable" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 2;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 0;
"param_launcher_substyle" = 2;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.app-extension";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos18.2";
"sdk_osVersion" = "18.2";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 14.7 (Build 23H124)
Xcode 16.2 (23507) (Build 16C5032a)
Timestamp: 2024-12-27T08:39:54-08:00
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)
Topic:
App & System Services
SubTopic:
Notifications
I have a “1” above the setting app on my iPhone. However when I open settings there is no notification that shows up. I have tried force restarting and done the beta updates as they release however nothing works to got rid of it. What can I do?
Topic:
App & System Services
SubTopic:
Notifications
"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 x date, 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."
As we are using firebase for receiving notifications and azure notification hub, I read that there is nothing we as developers need to do and will be handled by the providers right?
I downloaded the .crt file to take the following steps. Could you please give me a guide on how to actually apply the file to the server?
Upload only files to a specific path on the Linux server.
keytool -import -alias cacert -file ca.crt -keystore client.truststore.jks
Is it possible to just apply it with the above command?
Please confirm.
thank you
Topic:
App & System Services
SubTopic:
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
Hi!
I am encountering an issue when attempting to send a test notification to update a live activity. The request is failing with the following error:
{
"code": 400,
"message": "bad-request",
"reason": "The device token doesn't match the specified topic.",
"requestUuid": "3ed3fc0c-9c57-4d67-8ae8-cbabe0579b10"
}
I have verified that all device tokens and app identifiers are correct, but the error persists. Could you please assist in identifying the root cause of this issue?
Does iOS provide a callback when a notification is manually removed from the notification tray ?
Currently, our company server is using the push service by calling APNS through the p8 certificate.
In this process, our server does not have a CA certificate or SSL certificate in use.
Only the p8 certificate is installed and only performs the role of calling APNS.
If it is used like this, is there no need to update the CA certificate separately?
Or do I have to apply a new SSL certificate and add the CA to it?
Can someone help me plz?
Topic:
App & System Services
SubTopic:
Notifications
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.
Topic:
App & System Services
SubTopic:
Notifications
Tags:
App Review
User Notifications
Background Tasks
Maps and Location
token:1ac0f5ef2d37a0593f09e88be0f87daca27f23d4f7637fbc7a8102413d673bc3
msgId: 37d28693-16fe-0746-733e-a49d5879becc
send time: 2024-11-04 22:04:18.0(UTC+08:00)
response result: InternalServerError
这是什么原因呢?
This error has been continuously occurring for about 9 hours. We have not replaced the certificate, modified the server code, or changed the firewall policy. Some requests succeed, but many are timing out, with several timeouts occurring every minute. We are unable to find the cause. Please help.
APNS Exception io netty channel ConnecttimeException: Connection timed out
APNSOutboundHandler
api.push.apple.com/17.188.169.28:443
api.push.apple.com/(other ip):443
api.push.apple.com/(other ip):443
api.push.apple.com/(other ip):443
api.push.apple.com/(other ip):443
...
after doing the "Reset all settings" in settings app. After the reset, our app isn't in the notifications menu and in "allow # to access" list, isn't the notifications option either. Reinstall seems to do the job but that's not an optimal solution.
Topic:
App & System Services
SubTopic:
Notifications
Push-notification token is properly requested and displayed from the iOS simulator / xcode, but not from the release in the AppStore... Both popups for permission (push-notifications and critical alert) appear and can be confirmed, but no callback takes place...
Topic:
App & System Services
SubTopic:
Notifications
Dear Apple Engineer
Recently we found that our push delivery rate has decreased. On the website "https://icloud.developer.apple.com/dashboard/notifications/teams/43Y657P48S/app/com.taobao.fleamarket", we found that starting from January 8, 2025, "Discarded - Token Unregistered" showed an upward trend, from millions to tens of millions.
We have not found the reason, and hope you can help us.
Team ID: 43Y657P48S
Bundle ID: com.taobao.fleamarket
Here are some failed tokens, in "Device Token Validator" The query is valid, but the user cannot receive the message:
56025f656cc3aa701898037f59e8d0cb937263ff5585cd1cec9ae661dcc15b19
5fbbd1e604d3662d7583e9377676f8fa276005145278d6dea04b4fc85a7b070e
f0970602551f8d249d8f97960a74006ad78688b52fec6b0d19a585 207caff62e 9388fb40209c100afc2db728342f6fe86c7e34787a8fe4a92b73d2503c5286e0 a2819a4708462588b07452ed827d9afb03c343b586e70dcb67a9981f76295704 8949373cd43783fa3e23d38d55ee1fd72475b39f9c2d2fedca3ecb925b094240
Best Regards!
I created a local notification as follows:
func scheduleNotification(title: String, subtitle: String = "", date: Date, id: String) {
// Extract the components from the date
let calendar = Calendar.current
let hour = calendar.component(.hour, from: date)
let minute = calendar.component(.minute, from: date)
let second = calendar.component(.second, from: date)
// Set the extracted components into DateComponents
var dateComponents = DateComponents()
dateComponents.hour = hour
dateComponents.minute = minute
dateComponents.second = second
let content = UNMutableNotificationContent()
content.title = title
content.subtitle = subtitle
content.sound = UNNotificationSound.default
let action1 = UNNotificationAction(identifier: Constants.NOTIFICATION_ACTION_IDENTIFIER_1.id, title: Constants.NOTIFICATION_ACTION_IDENTIFIER_1.label, options: [])
let action2 = UNNotificationAction(identifier: Constants.NOTIFICATION_ACTION_IDENTIFIER_2.id, title: Constants.NOTIFICATION_ACTION_IDENTIFIER_2.label, options: [])
let category = UNNotificationCategory(identifier: "reminderCategory", actions: [action1, action2], intentIdentifiers: [], options: [])
UNUserNotificationCenter.current().setNotificationCategories([category])
content.categoryIdentifier = "reminderCategory"
let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: false)
let request = UNNotificationRequest(identifier: id, content: content, trigger: trigger)
// add our notification request
UNUserNotificationCenter.current().add(request)
}
and I also have
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
// Handle foreground presentation options
completionHandler([.sound, .badge])
}
but for some reason the notification only shown on the phone. I've made sure that the phone is locked, apple watch is unlocked and also the notification setting in the watch app for this app is set to mirror.
hi i'm testing the new certificate. I'm using the p12 certificate and without doing anything, the sandbox can still be functioned.
I assume the new certificate has already been installed in the default path by linux. so I execute
openssl s_client -connect 17.188.143.34:443 -servername api.sandbox.push.apple.com -verifyCAfile /etc/pki/tls/certs/ca-bundle.crt -showcerts
and i received
CONNECTED(00000003)
depth=2 C = GB, ST = Greater Manchester, L = Salford, O = Comodo CA Limited, CN = AAA Certificate Services
verify return:1
depth=1 CN = Apple Public Server RSA CA 12 - G1, O = Apple Inc., ST = California, C = US
verify return:1
depth=0 C = US, ST = California, O = Apple Inc., CN = api.development.push.apple.com
verify return:1
---
Certificate chain
0 s:/C=US/ST=California/O=Apple Inc./CN=api.development.push.apple.com
i:/CN=Apple Public Server RSA CA 12 - G1/O=Apple Inc./ST=California/C=US
-----BEGIN CERTIFICATE-----
...
so the server indeed has the certificate, is this correct?