We asked for and received confirmation that we have received the Critical alert entitlement.
I have also tested it in development build with a development profile and it worked.
However when we try to send an update to test flight to test in release mode on our device, we get the following error:
The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.usernotifications.critical-alerts'
NSLocalizedFailureReason = "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.usernotifications.critical-alerts' in our app.
SUnderlyingError = "Error Domain=IrisAPI Code=-19241 "Asset validation failed" UserInfo={status=409, detail=Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.usernotifications.critical-alerts in our app code=STATE_ERROR.VALIDATION_ERROR.90163, title=Asset validation failed
we added the following entitlement to the entitlements.plist file:
com.apple.developer.usernotifications.critical-alerts
User Notifications
RSS for tagPush user-facing notifications to the user's device from a server or generate them locally from your app using User Notifications.
Posts under User Notifications tag
157 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Some users couldn't receive push notifications, and APNS returned a 'DeviceTokenNotForTopic' error. Upon validation using Apple's tool, I found that some tokens are identified as VoIP push tokens, and some as Live Activity (LA) push tokens.
When attempting to send a normal alert push using these VoIP/LA push tokens, it didn't work and returned a 'DeviceTokenNotForTopic' error.
These tokens were obtained from Apple's delegate function 'didRegisterForRemoteNotificationsWithDeviceToken.' It's unexpected to receive VoIP/LA push tokens from this event, but this issue is occurring, and I've observed it specifically in iOS 17 users.
This problem is not universal and is happening only for some users. Please take note that our app support VoIP Push, Live Activity Push and Normal Push notification.
Could this be an iOS 17 bug? Any advice on this matter would be appreciated.
Thanks.
Hi there,
There might be something obvious I'm overlooking, but I can't for the life of me figure it out.
Any help or guidance would be much appreciated!
I've enabled push notifications for one of my app identifiers (developer portal and provisioning profile appear to be correct, as does the entitlements file).
On a simulator, when I call registerForRemoteNotifications(), I immediately get a callback from didRegisterForRemoteNotificationsWithDeviceToken. However, when I run my app on any of my physical devices, this method is never called. Nor is didFailToRegisterForRemoteNotificationsWithError.
If I manually remove the aps-environment key and deploy to my device, then didFailToRegisterForRemoteNotificationsWithError is invoked with an expected error message.
Any idea what I may have done wrong here?
I'm using Xcode 15.0.1 and have tried an iPhone 12 (iOS 15.5) and iPhone 13 Pro Max (iOS 16.7.2).
My development environment requires a VPN, but I've tried disabling the VPN in case that was an issue.
I've also tried restarting the devices and toggling Wi-Fi, airplane mode, etc.
My app does integrate with Firebase (not FCM though), but I added the FirebaseAppDelegateProxyEnabled NO option, just in case (this wouldn't explain why it works on Simulator though).
Thanks for your help!
I'm currently facing an issue with APNS token registration on iOS 16.7.1 specifically for iPhone 8+. I'm working on integrating Firebase into my iOS app for push notifications.
Problem:
The problem I'm encountering is that the didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError delegates are not being called at all, despite Firebase successfully generating the FCM token.
Environment:
Device: iPhone 8+
iOS Version: 16.7.1
Xcode Version: latest
Swift Version: latest
Firebase SDK Version: latest
Observations:
Firebase successfully generates the FCM token, indicating that the device is able to connect to Firebase Cloud Messaging.
However, the standard APNS delegate methods (didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError) are not being triggered.
This issue seems specific to iOS 16.7.1 on the iPhone 8+. I already tested on other iphone its work normaly.
Steps Taken:
1.Ensured that APNS is properly configured in the Apple Developer Console.
2.Firebase is set up correctly, as evidenced by the successful generation of FCM tokens.
3. No relevant errors or warnings in the Xcode console.
Question:
Has anyone else experienced a similar issue on iOS 16.7.1 or with iPhone 8+ devices? Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated.
Thank you in advance for your time and assistance!
Additional Information:
If you need more information or code snippets, please let me know.
If there's a more appropriate place to post this issue or if it has already been addressed, kindly guide me.
Hello!
Currently we are reviewing an issue whereby our users were obtaining Live Activities update, but somehow at the end, there were Live Activity updates that were not properly received by the device.
For example:
20 Live Activity updates sent to device, 17 were properly received, however the last 3 were not properly received (as can be seen by the UI of it not updating).
So far we have looked into a few root causes highlighted on the forums and on stackoverflow:
Timestamp of APNS (every one of the APNS has a different timestamp)
200 is seen from the APNS side, which is why we were confused by the push notification did not arrive on the device side
Looking into our logs, its unfortunately not covered enough to tell us when this had been received
Some questions here:
Is there a way we could log every Live Activity / Push Notification received from APNS? (for all scenario, app on lock screen, app in background)
Anyway to track a push notification's lifecycle? I know the Push Notification Console tool is useful for debug usage, but we wanted to see if there's something similar for production usage as well.
I've got a code that was making a successful registration for remote messages a few weeks ago. Here's how it was looking like:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
registerForRemoteNotifications(application: application)
return true
}
func registerForRemoteNotifications(application: UIApplication) {
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: { _, _ in }
)
application.registerForRemoteNotifications()
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
print(deviceToken)
}
A few weeks ago the didRegisterForRemoteNotificationsWithDeviceToken method was calling after registration, but now neither didRegisterForRemoteNotificationsWithDeviceToken or didFailToRegisterForRemoteNotification methods are called. Why could this happen?
I created an application and initially I wasn't going to use it to send notifications, but then I realised that I needed to. So quite naturally, I changed the settings in "Certificates, Identifiers & Profiles".
I activated :
Communication Notifications
Time Sensitive Notifications
But not: Push Notifications
Because it's a local application.
However, when I transfer a new build to TestFlight, the notification settings are not present in "Settings" on my iPhone:
Same thing, in the notifications settings, it doesn't show up :/.
So my question is this: How can I get my notification settings to be "activated", knowing that they weren't originally authorised in my "Certificates, Identifiers & Profiles" settings?
Why did Apple change the sound for Notifications in iOS 17??? I just finally upgraded today from iOS 16.7.2 to iOS 17.1.1 and among other things I don't like, this one makes no sense whatsoever! Why can't user select the sound we want for Notifications? At least when I had the Tri-Tone sound I could hear it. The new sound is way too quiet, causing me to miss notifications now.
PLEASE FIX THIS ASAP!
I've noticed there are certain apps which seem to track that I'm using my iOS device, and then send me push notifications based on my usage.
For example, I may pick up my phone in the middle of the night, unlock it, check my email, and minutes later, this app will send me a push notification attempting to sell me something.
Is an actually app permitted to track my activity/usage on my iPhone, outside of my activity and usage within that app? If so, where can I learn more about this? Or is this app in violation of some rule in the ToU?
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.
iOS 17, the default notification tone is changed to - rebound instead of tri-tone. And now, it is too quite. Also, it can't be changed or replaced. Is it possible that it will be replaced/fixed ????
We have an app where the notification service extension works well most of the time. However, sometimes we have noticed that the extension completely stops working even when the notification is sent successfully via the APNS server in production. We do not see even the log from the didReceive() function in that case. The only way we can get the extension working again is after restarting the iPhone.
Trying to understand when this might happen?
Is it something that is throttled by iOS?
Would it happen when the device memory is low or the app is using too much memory?
We have seen the extension crash sometimes due to hitting memory limits, however, the extension process is spawned again when a new notification comes in.
Any kind of help or guidance would be greatly appreciated.
Thanks
We have setup acknowledgment API calls in the notification service extension processing to be notified when the notifications reach the device. So based on that we know how often the devices stop responding with the ACK to sent notifications. It happens seldom with some users and we have to ask them to restart their device to get the extension functional again.
Hi. I developed a PWA app with fcm because iOS supports push api from iOS 16.4ver
My server push message to fcm with this format.
As you can see, we use webpush.fcmOptions.link to open the url page when users touch notification. On web browser and android, this option works but ios pwa don't. iOS just opens the PWA but can't open the url specified in fcmOptions.link.
Is there anyone who knows about this?
Can I fix it?
Hello Everyone!
After push notifications were enabled we got to work on this feature. for our PWA.
The problem that we are having is that they work great for a little bit and then they suddenly stop working. We thought it was our problem but after doing some research I found that many other developers are having this same issue.
Push notifications work perfectly on Android but don't reach ios users.
Is anyone else having the same issue? Can something be done to fix this?
Thanks!!
Hi,
How can I send push notification for point update and promos to my loyalty wallet users. Currently I get push notification Id when user install loyalty wallet and I use it for sending wallet updates. But when I tried to use this push notification id for custom APN messages it doesn't appear anywhere.
Thank you.
Hello,
When attempting to assign the UNNotificationResponse to a Published property on the main thread inside UNUserNotificationCenterDelegate's method
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async
both Task { @MainActor in } and await MainActor.run are throwing a NSInternalInconsistencyException: 'Call must be made on main thread'.
I thought both of them were essentially doing the same thing, i.e. call their closure on the main thread. So why is this exception thrown? Is my understanding of the MainActor still incorrect, or is this a bug?
Thank you
Note: Task { await MainActor.run { ... } } and DispatchQueue.main.async don't throw any exception.
Hello everyone!
Our team is in the middle of developing a new sleep tracking app with a bunch of additional features including a custom alarm clock. And we need Critical Alerts entitlement for this feature to work as only such notifications (critical interruption level for iOS 15) can break through Silence Ring & Do Not Disturb mode, which is necessary as users obviously won't wake up without the alarm actually going off.
We've applied twice already, clearly stating the purpose of this entitlement, but both times received the same answer: "Unfortunately, this API is not designed for the use you've identified".
While Apple Developer documentation on the matter is rather elusive and states that, among others, home- & health-related purposes are allowed, I couldn't find any straightforward info about our particular case. Moreover, I can easily name a few apps in the Health & Fitness category with exactly the same alarm clock functionality that works and obviously utilizes Critical Alerts entitlement.
So I wonder, can anyone give a piece of advice on how to get this entitlement? Maybe we need to provide some additional info or meet some unannounced conditions? Any info will be highly appreciated.