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

Questions about ConsumptionRequest properties
Hello. platform: Please let me know which platform 'Non-Apple platform' is referring to. For example, Google or Amazon? And is it correct to mean the platform that consumed the products received due to in-app purchases? playTime: Does 'playTime' mean the time when the customer purchased the app and actually accessed the app? Or do you mean the time you accessed after the in-app purchase?
0
0
72
2d
Are push to start APNs tokens the same across different live activity types?
The ActivityKit API requires developers to parameterize calls to pushToStartTokenUpdates by the live activity's attributes, e.g. for await data in Activity<AdventureAttributes>.pushToStartTokenUpdates { // Send token to server. } for await data in Activity<BoringAttributes>.pushToStartTokenUpdates { // Send token to server. } At runtime, I have noticed that the token is the same for the different live activity attribute types we support in our app. Can someone confirm if this behavior is consistent? If the pushToStartToken is the same across different live activity types, it can simplify our database design 🙏🏼.
2
0
112
4d
com.apple.developer.usernotifications.filtering
Nous souhaitons activer l'entitlement com.apple.developer.usernotifications.filtering pour notre extension MsgNotificationService. Pourriez-vous nous fournir des instructions supplémentaires ou activer cet entitlement pour notre App ID ? Si des informations supplémentaires sont nécessaires ou des étapes spécifiques doivent être suivies. actuellement cela n'a pas d'impact sur le build mais sur le product->archive. impossible upload le build Une idée, un conseil ? Merci,
2
0
87
4d
Text-to-speech when you receive an important alert while the app is closed
If you are receiving a regular push notification and try to read the content of the push notification in AVSpeechSynthesizer, it will read the text when the app is in the foreground, but when the app is closed, stopped, or in the background, it will display “Unable to list audio folders” and the text cannot be read. I couldn't find anything in the documentation about whether this works for critical alerts, so if anyone knows, please let me know. This text has been translated with DeepL
1
0
55
4d
Custom Push Notification for Apple Wallet Pass not Showing up on iPhone
I've implemented pass generation successfully and it's updated through Apple's silent notification, which updates the passes to their latest versions. I want to send some marketing push notifications to the Apple Wallet App as shown in my post at stackoverflow. Here is the Silent notification implementation, which is working perfectly fine. const options: apn.ProviderOptions = { token: { key: fs.readFileSync("./certs/APNs_AuthKey_7YYF346FU5.p8"), keyId: "******", teamId: "******", }, pfx: fs.readFileSync("./certs/private_key.pem"), cert: fs.readFileSync("./certs/certificate.pem"), production: true, rejectUnauthorized: true, }; const apnProvider = new apn.Provider(options); async function sendSilentPushNotification( deviceTokens: string[], serialNumber: string ) { try { const notification = new apn.Notification(); notification.topic = "pass.com.digital.passmaker"; notification.payload = { aps: { "content-available": 1, }, serialNumber, }; notification.priority = 5; return await apnProvider.send(notification, deviceTokens); } catch (error) { logger.error("Apple Notification error: " + error); return error; } } Here is the marketing notification I am trying to send, it is working with success, but I don't see any notification on mobile phone. please help me to fix it. async function sendCustomPushNotification( deviceTokens: string[], serialNumber: string, title: string, body: string, category?: string, badge?: number ) { try { const notification = new apn.Notification(); notification.topic = "pass.com.digital.passmaker"; // Set the title and body of the notification notification.alert = { title: title, subtitle: "Pass Update", body: body, }; // Set the sound to play when the notification is received notification.sound = "default"; // Set the badge number on the app icon (optional) if (badge !== undefined) { notification.badge = badge; } notification.contentAvailable = true; notification.mutableContent = true; notification.aps.category = category; notification.aps.alert = { title: title, body: body, }; notification.aps.badge = badge; notification.aps["content-available"] = 1; notification.aps["launch-image"] = "https://banner2.cleanpng.com/20180423/gkw/.......jpg"; // You can still include the serialNumber in the custom payload notification.payload = { serialNumber: serialNumber, aps: { "content-available": 1, "mutable-content": 1, "interruption-level": "time-sensitive", }, }; // Set to high priority notification.priority = 10; return await apnProvider.send(notification, deviceTokens); } catch (error) { logger.error("Apple Notification error: " + error); return error; } } I literally receive a success response from api returning the device pushToken with no errors. However, no notification show on my iPhone
0
0
61
6d
Not receiving push sent when device was offline
Hi, we noticed some issues with our app when it comes to receiving pushs sent when a device was offline. We know that only one push is stored if multiple are received while the device was offline but we got reports of multiple users that aren't receiving any pushs that were sent while they were offline. Reinstalling the App didn't help. We ruled out the third-party providers we used as my first thought was that there was some issues with setting the expiry but it also happens if directly sent over APNs. With a development build and the sandbox APNs I had no issue receiving one push after getting back online. But after reinstalling the production app no push after being offline. Example sent with the Push Notifications Console but I also tested it with curl directly: curl -v \ --header "authorization: bearer ${AUTHENTICATION_TOKEN}" \ --header "apns-topic: de.alarm-it-factory.ACC-App-Xamarin" \ --header "apns-push-type: alert" \ --header "apns-priority: 10" \ --header "apns-expiration: 1721379960" \ --data '{"aps":{"alert":{"title":"Test","body":"Expiry Test 4"}}}' \ --http2 https://api.push.apple.com:443/3/device/46F201D299F2B900CF3BF3096341116B9D5A69D103F2C0ACF18634823F73AB79 Sent: 15. Juli 2024, 16:00:42,361 MESZ Received: not received Topic: de.alarm-it-factory.ACC-App-Xamarin BundleID: de.alarm-it-factory.ACC-App-Xamarin Token: 46F201D299F2B900CF3BF3096341116B9D5A69D103F2C0ACF18634823F73AB79 apns-id: ec14fba2-efa5-4ace-9e22-3e4e5a64d630 I sent test messages before and after acivating airplane mode to make sure I have the correct token.
1
0
109
6d
CommunicationNotifications error
I'm trying to use communication notifications but I am getting this error in my logs. I've already checked my entitlements and signing & capabilities. I have notifications, communication notifications, and siri enabled. [com.testapp] _UNNotificationContentType is 'UNNotificationContentTypeMessagingDirect' but messaging notifications are not allowed. Abandoning communication API features for all messaging notifications. Perhaps app isn't allowed to donate messaging intents or is missing the communication entitlement.
0
0
48
6d
Notification Service Extension is initialized but never triggered
Hi all, I'm attempting to implement a notification service extension for my app, however I'm running into some troubles with triggering the extension. The service extension is successfully installed with the app, and is initialized when a notification is received (which ive confirmed by attaching a debugger to it), however the didReceive method is never called. In the debugger console, the following message is printed: Service extension base class recieved didReceiveNotificationRequest: . I can confirm that the all the payload requirements are met to trigger the extension, and I was able to create an extension that would trigger in a blank application (using the same payload). It's only this app that prints this message to the console, and does not trigger. The extension code is as follows (I've removed all of the intended functionality at this point to try and pinpoint the issue) class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override init() { self.contentHandler = nil self.bestAttemptContent = nil print("startup!") } func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) async { let logger = Logger(subsystem: "app.revolt.chat", category: "notificationservice") logger.info("Invoked notification extension") debugPrint(request) self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) guard let bestAttemptContent = bestAttemptContent else { print("content is null") return } bestAttemptContent.title = "beans" if request.content.categoryIdentifier != "ALERT_MESSAGE" { bestAttemptContent.subtitle = "not an alert message" contentHandler(bestAttemptContent) return } contentHandler(bestAttemptContent) } override func serviceExtensionTimeWillExpire() { // Called just before the extension will be terminated by the system. // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { contentHandler(bestAttemptContent) } } }
0
0
151
1w
iOS 18 beta 3 CarPlay issues
I’ve been using iOS beta 3 for a few days, and I’ve began to notice that I am not able to send messages through CarPlay. At first, I thought it was a bug with my phone, so I restarted it. Then, I removed my car from CarPlay and reconnected, then connected it to a family members car and still have the same issues. The issue being whenever I try to send a message using Siri, she replies with “There is not an app for that, download one when not in the car.” Or something along those lines. If anyone else is having the same issue, or knows a fix, please let me know.
8
2
930
1w
Broadcast push being throttled with very little traffic
Hi, We've implemented the new Live Activity Broadcast push notifications (https://developer.apple.com/documentation/usernotifications/setting-up-broadcast-push-notifications) and are testing this out in sandbox/development. Looking at our logs I can see that we tried to send 54 broadcast notifications the last hour. 16 of these failed with "429 Too Many Requests". We probably have no devices registered on any of the channels at the moment. These are all channels from the "Development" environment. Any pointers to what could be wrong? Regards, -Tommy
4
0
171
1w
Local push for wake up an app
Hello, We a company that deals with alarm systems in hospitals and we would need to manage, for one of our apps, that the application, even if in the background, can be reactivated and brought to the foreground showing the type of alarm received. We learned of a Dutch company who, they say, thanks to a special agreement with Apple, managed to achieve this using Local Push. We have already done something similar with Android through Foreground services and we would like to do something similar for iOS too but at the moment we have not succeeded because it seems the OS of mobile devices does not allow it. Apart from the normal documentation on local push I can't find much other information about it. Is there anyone at apple who could help me? Thanks
1
0
134
1w
Set up-to-date badge count when using UNNotificationRequest with trigger
hi, I am trying to schedule a UNNotificationRequest at a certain date using UNCalendarNotificationTrigger, and I also want to update the badge count accordingly. However the badge property in UNNotificationContent can only be set when adding UNNotificationRequest, not when the trigger is fired or notification is actually delivered. How can I set up-to-date badge count if notification is scheduled in the future? For example, if I scheduled notification A to 3 hours later with badge count 1, and in between I got notification B, badge count should be 2 when A is delivered but it will be 1. I am aware of didPresent delegate which can be used when app is in foreground when notification is delivered, but is there any delegate that is called when UNNotificationRequest is delivered and app is backgrounded or we are using NSE? Thanks.
1
0
118
1w
Issue with Suppressing Push Notifications Using UNNotificationServiceExtension
Hello, I have developed an update for my app where I handle push notifications (from APNs or FCM) and manage different notification categories using checks, storing the values in UserDefaults. So far, everything works fine, and the logs correctly indicate the state of each category when a notification is received. The issue arises when handling notifications in three states: foreground, background, and terminated (killed). I am using UNNotificationServiceExtension and in the didReceive method, I check the state of the notification. Depending on whether the state is true or false, I want the notification to be shown or not to the user. However, despite my efforts, the alert/notification part of the payload always ends up being displayed. Additionally, I have disabled serviceExtensionTimeWillExpire as it was being triggered, but still, after a few seconds, the notification ends up appearing. I have configured everything correctly, including mutable content, notification handling, etc. How can I prevent these notifications from being shown to the user when needed? Thank you for your assistance!
2
0
130
1w
MDM ActivationLockRequest Error 405
按开发者文档进行请求,响应405 接口文档:https://developer.apple.com/documentation/devicemanagement/activation_lock_a_device 实际请求如下: curl --location --request POST 'https://mdmenrollment.apple.com/device/activationlock' --header 'X-ADM-Auth-Session: 1720513551341O1O293...' --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' --header 'Content-Type: application/json' --header 'Accept: /' --header 'Host: mdmenrollment.apple.com' --header 'Connection: keep-alive' --data-raw '{"device": "FNXQX..."}' 这个问题要怎么解决?
1
1
90
1w
App Store App Push Notification Delivery Issue
We are experiencing issues with Push Notification delivery for our Lulu Money application (com.lulu.luluone) using Apple ID 1163514668. Upon reviewing the Push Notifications console, we have found that out of the 7.294M Priority Notifications sent in the last 4 weeks, only 1.226M were delivered to the device. The majority of the undelivered notifications, totalling 5.479M, are categorized as "Stored - Device Offline." This issue is negatively impacting our customers, and we need assistance in resolving it to ensure smooth notification delivery.
2
0
148
1w
Multiple pending APNS notifications delivered at once when the app enters foreground
I am working on a VoIP based PTT app. Uses 'voip' apns notification type to get to know about new incoming PTT call.  When the app is in foreground, the app gets to know about incoming VoIP PTT call through incoming push notification. After receiving notification, the app receives audio from the server. This works properly, as expected. The app faces issues in receiving apns notifications only when the app is in background. Issue: My app is in background and iPhone locked, the server sends apns notification to the target iPhone about a new incoming VoIP call. Server received 200 success response code from APNS. But the app in background did not receive the notification. Second time, the server sends notification about second VoIP call. App did not receive notification. Third time, server sends notification about 3rd incoming call. This list goes on. Everytime server sends a notification to the target phone, success response is received from APNS. 
 Now, bring the app to foreground, the app receives all the pending notifications at once. This scenario happens only in a few phones. Those customers are missing PTT calls.
Can you please provide us suggestions to solve this issue ? My app uses unrestricted-voip entitlement
0
0
150
1w
How to archive an app with NotificationServiceExtension?
I was able to successfully archive my main app that has a NotificationServiceExtension. However, once I installed the app via Testflight, I was able to receive a notification, but the push notification modifications I did were not applied. When I just ran it via Xcode, the push notification modifications worked. Do I need to archive the NotificationServiceExtension instead of my main app?
1
0
130
1w