Notifications

RSS for tag

Learn about the technical aspects of notification delivery on device, including notification types, priorities, and notification center management.

Notifications Documentation

Post

Replies

Boosts

Views

Activity

LiveActivity crashs in iOS 14
LiveActivity is effective in ios16, but error reported only in ios14 Some error message reported from Xcode: Process: LiveExtension [20099] Path: my.app/PlugIns/LiveExtension.appex/LiveExtension libswiftCore.dylib swift_getAssociatedTypeWitness SwiftUI BodyAccessor.makeBody(container:inputs:fields:) SwiftUl closure #1 in WidgetGraph.init(rootBundle:)
0
0
303
Jan ’24
Push Notifications are not delivered to a good percentage of users
Hi all, In the app I developed for iOS I am using Firebase SDK (cloud messaging FCM) to provide the topic feature to deliver notification to thousands subscribed iOS users. I know FCM does not directly deliver the notifications to the final users and this is just an intermediary that formats the notification in way the APNs can understand client by client (using the APN device tokens) and this service (APNs) is in charge of delivering the notifications to the final users. The notifications are sent from a linux server through a cURL request to FCM. One example of silent notification that is like a heartbeat is below: !/bin/sh notifID=`date +"%Y%j"` value=`date -u "+%s.%N"` curl -H "Content-type: application/json" \ -H "Authorization:key=XXXXXXSECRETXXXXXX" \ -X POST -d '{ "to": "/topics/ioschannel","content_available":true,"data":{"notificationType":"silentNotification","silentNotificationId":"'$notifID'","senttime":'$value'},"priority":"high","headers":{"apns-priority":"10"},"time_to_live":60}' \ https://fcm.googleapis.com/fcm/send In the below image you can see some statistics provided by the metrics in the Apple Push Notification Console. We currently have almost 5.5k users who have mainly installed the app on their iPhones. As you can notice the APNs received a bit more than 5k notifications but what it is remarkable is the fact that only about 70% of the users receive the notification on their devices. Few notifications are on the APNs storage and delivered later on. Some devices can be offline and others are can be on power save mode but I don't understand why so many users are not receiving the notification (this particular notification is sent at 5 pm local time). Aside from the example silent notification I send other notifications to be processed in the background in the app in order to evaluate and decide to present or not a notification on the notification bar with a sound. The situation is the same, almost the same percentage don't receive the notification and almost 70% receive them on time. I have another app in Android and I don't have this problem. More than 90% of the users receive the notifications. What it is really interesting about Android is that the user can provide the permission to remove the app from the battery optimization. This is really important permission because the Android OS provides resources (network and giving priority to received push notifications) and even in power save mode the notifications are delivered. If I go straight from our linux server to APNs this situation won't change because APNs cannot deliver the notifications. Why is this happening? Is there any way to provide a permission to the app to have the highest priority? Any advice, feedback or hint will be really appreciated.
0
1
317
Jan ’24
CallKit VOIP end reason
When there is an ongoing call, if the user gets another one, we don't want to support multi-call and directly send the new call to the voicemail. For this operation what should be CXCallEndedReason? My understanding is that remoteEnded is used when the call connected and then ended. unanswered might be the choice for me but would it cause any issue if i directly reject a call with this status (the difference between the incoming call and reject time would be too short)? There is also declinedElsewhere , which might be suitable
0
0
448
Jan ’24
CloudKit push notification not working on Sonoma
I have an app that uses CloudKit push notification (CKDatabaseSubscription) and it's been working all along on Ventura 13.5/Xcode 15.0. But since I upgraded my Mac to Sonoma 14.3/Xcode 15.2, my app no longer receives push notification (didReceiveRemoteNotification is not called) on the Mac. Is this a known issue of either Sonoma or Xcode 15.2? FYI, the same code works perfectly on iOS 17.2.
0
0
317
Jan ’24
Push notifications doesn't make a sound while received on iOS 17
Hi all, More than a iOS dev i'm first of all a support tech. My company develops and makes available to our customers three iOS apps like one who received 3,4k reviews on the AppStore. Since many users of our apps upgrated to iOS 17 they started complaining their iPhones are not playing a sound anymore when a push notification is received. Thought at first glance that it was a simple issue like the new "rebound" ringing playing less lounder than the usual "tri-tones". But i ran my tests and it's a fact: our applications doesn't ring anymore when push notifications are received (while other apps like Protonmail rings well on the same set-up). Does any of you folks faced or are facing the same issue? Is this a setting to do on each phone? Or can it be solved by improved development (I wish it could)? Thank you very much for reading and feel free to ask any further infos. Kind regards, Pierre
1
0
424
Jan ’24
push notifications on-premises
Even in the event of a disaster, push notifications are used to notify smartphone owners. However, we have received requests from customers for an app that assumes that the LTE network is disconnected due to base station inconveniences during disasters, and communication from the Apple cloud cannot be considered. In that case, you would like to send push notifications to the iOS app on-premises within the customer's server, but there is a way to do that.
2
0
343
Jan ’24
I am looking for a way to determine if this is a device polling.
When device polling occurs in the link below, is there a way to determine from the requests received on the server side whether the request was device polling? https://developer.apple.com/documentation/devicemanagement/implementing_device_management/handling_notnow_status_responses#3690890 Or can I add a specific parameter when the MDM server instructs the APNs so that the device sends the request to the MDM server with that parameter included? If this is possible, we think we can determine if the request is a polling request.
2
0
331
Jan ’24
FCM Push notifications stop working on PWA
I have implemented Web push notifications for a website built on NextJs 13 using Firebase and they are working perfectly on desktop Chrome, Safari, and Android Chrome. But on IOS after adding the website to the home screen, the user initially starts receiving notifications after 3-4 notifications even if the user does nothing and just leaves the PWA open, the user stops receiving notifications foreground and background. On further debugging, I found out that the FCM device token gets changed. I have no idea why it is changing automatically without doing anything It happens only for IOS. IOS version 17.3 and 16.7, Firebase version 10.7.1 Is this a bug? or if someone can guide me on this?
1
0
616
Feb ’24
Programmatic Access to ScreenTimeAPI
When is there going to be access to the ScreenTime API / ActivityKit API so that we can programmatically access Phone Pickups and Screen Time for applications? Currently, the information is limited to getting callbacks when a threshold is hit or approached, but we don't know really anything about what the threshold is, and we cannot do that in the background. It seems incredibly limited on scope. Any thoughts or estimates on when this might be possible? Thank you so much!
0
0
316
Feb ’24
The failed reason `Unregistered` for APNS notification is no longer exists since February 1st, 2024
Refer to the document: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns#3394529 Error code 410, 'Unregistered' means: The device token is inactive for the specified topic. But since February 1st, 2024, we did not got 'Unregistered' response any more. Do you know why ?
3
3
784
Feb ’24
TARGET_OS_IPHONE/TARGET_OS_IOS not defined in iPhone SDK 17.x
In my app code I used TARGET_OS_IPHONE/TARGET_OS_IOS for SDK 15 and 16. After go on SDK 17.x these macros are not defined. In my investigation, I found that in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/TargetConditionals.h __is_target_environment(macabi) return false hence the issue. Could you please verify and explain, if I do not understand / use correctly. Regards, Alexei
0
0
303
Feb ’24
UNNotificationServiceExtension suddenly stopped working
Hi, I have a UNNotificationServiceExtension, which was running perfectly fine for more than a year. Last week, it has suddenly stopped working, with no apparent changes to the server-side application sending the notification to APNS. The strange part is that it works on some devices and it doesn't work on others. I have confirmed that notifications are enabled for the app in iOS system preferences. com.company.product is the bundle identifier of the main app com.company.product.yyyyy is the bundle identifies of the NSE appname.app and nse.appex are the placeholders for the name of the app and name of the NSE respectively Following is the NSE info.plist: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDisplayName</key> <string>yyyy</string> <key>CFBundleName</key> <string>yyyy</string> <key>CFBundleIdentifier</key> <string>com.company.product.yyyy</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> <string>y.y.y</string> <key>MinimumOSVersion</key> <string>13.0</string> <key>NSExtension</key> <dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.usernotifications.service</string> <key>NSExtensionPrincipalClass</key> <string>NotificationService</string> </dict> <key>CFBundleVersion</key> <string>yyy</string> </dict> </plist> Model: iPhone 15 Pro Max iOS Version: 17.3
3
1
639
Feb ’24
Force Update required after App Transfer for Push Notifications?
This question is a follow-on and clarification from this earlier post. I'd just like to confirm that after an App Transfer has been completed, whether there is any need for a new release to be cut? Judging from the prior post, my understanding is that a new release would not be necessary, and that all the existing versions of the app will continue to connect successfully with the APN servers. The only necessary update would be the server connection between the APN servers and the server used to generate notifications, with a new token or certificate. Is my understanding correct?
2
0
392
Feb ’24
window.safari.pushNotification.requestPermission() no longer works with Safari 17.3 on macOS 14.3
One Line Summary window.safari.pushNotification.requestPermission() is no longer showing a prompt to the user with Safari 17.3 on macOS 14.3 and it's callback fires as "denied". Why this is is important to fix Starting with Safari 16 for macOS 13 Apple introduced support for the standard Push API. However it is expected that the original Safari JS API window.safari.pushNotification should continue working, as many sites have not fully upgraded to the new API and Apple has not announced a deprecation. Environments NOT Working macOS 14.3 with Safari Version 17.3 (19617.2.4.11.8) macOS 14.4 Beta (23E5191e) with Safari Version 17.4 (19618.1.13.11.5) Working macOS 13.6.4 with Safari Version 17.3 (18617.2.4.11.11, 18617) MRE (minimal reproducible example) See the following site to quickly reproduce the issue noted here: https://public-mre-macos-window-safari-prompt-bug.glitch.me/
2
3
457
Feb ’24