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

didReceiveRemoteNotification fires on Xcode build but not on .ipa builds.
Hi, We are trying to implement a system that delivers real time data updates to our apps through the Firebase Cloud Messaging system using the REST API with the relevant payload. We set content-available to 1 so that the payload delivery is silent. We use the didReceiveRemoteNotification delegate function to receive the push notification. It works seamlessly when the app is built through Xcode but when we tried it on an .ipa, the delegate function is not called. We have tried setting different parameters in apps-priority and apps-push-type but without much success. Apple documentation points out that there are some restrictions when it comes to receiving silent push notifications in this way. But in our case, it looks like Xcode builds work perfectly while ipa builds are very spotty at best. Is this not the right method to receive real time data updates? It was our impression that this is how chat apps for example are setup to receive real time text updates. If this method cannot be used, does anyone have any other suggestion as to how to go about achieving the same behaviour within our apps? Thank you! Fardin
2
0
368
Jun ’24
Sequoia Beta - Location of system notification pop-ups
About ten minutes ago, a gray notification popup appeared in the upper right corner of my desktop, something about not using my Apple ID. Before I could see what it was, it retracted into the "side" of the desktop again, and I cannot locate it. In Sonoma, notifications were in the notifications but where do I find messages like that in Sequoia? It's not in the Notification Center, and I can't find a widget to show them, nor is it in the Console. Thanks for any help.
0
0
273
Jun ’24
Live Activities
I work on an App that uses Live Activities and shows a countdown. We want to use it without the seconds. We are currently using Text(getDate(), style: .relative). Is there a new method in Swift to show the countdown on a Live Activity without seconds being displayed.
1
0
394
Jun ’24
Experiencing Duplicate Notifications Issue Recently By Multiple Users
We recently noticed that our app is receiving duplicate notifications, and this is impacting multiple users, and we verified from our server that we are sending the notifications only once This is a sample payload of the notifications we are sending { "aps": { "alert": { "title": "title", "body": "body" }, "category": "test", "mutable-content": 1 }, "navigateTo": "test", "imageUrl": "test" } Also a user with IOS 17.5.1 reported this issue also
2
0
542
Jun ’24
React Native push notifications not working in iOS.
I am trying to set up the push notification for iOS for React Native version 0.71.7. I have done all the setup for this push notification which is mentioned in your git repository. Push notification was working fine for my old version of project 0.67.2. But in this new version, it is not working. Please help me out to solve this problem. Mechine Configaration :- Mac Os Version:- 14.4.1 Xcode Version:- 15.3 Node Version:- v20.12.0 RN Version:- 0.71.7 Git issue link :- https://github.com/react-native-push-notification/ios/issues/443 Please help me to solve this problem i have been suffering from this problem for a long time after upgrading the React native project version.
1
0
357
Jun ’24
Difference in behavior between setBadgeCount and applicationIconBadgeNumber
Hi, I have a question regarding the badge in push notifications. I am implementing the following code to set the badge to 0 in order to remove it from the app: swift if #available(iOS 16, *) { let center = UNUserNotificationCenter.current() center.setBadgeCount(0) } else { application.applicationIconBadgeNumber = 0 } When I call setBadgeCount(0), the badge disappears, but the notifications in the Notification Center remain. On the other hand, when I call application.applicationIconBadgeNumber = 0, the badge disappears and all notifications in the Notification Center are cleared. Additionally, if no badge is displayed, calling application.applicationIconBadgeNumber = 0 does not clear the notifications in the Notification Center. Is this behavior expected? If it is expected, is there a way to call setBadgeCount(0) and clear all notifications in the Notification Center? Also, is there a way to call application.applicationIconBadgeNumber = 0 without clearing the notifications in the Notification Center?
2
0
586
Jun ’24
What am I missing in getting VOIP Push working in a test environment?
Setup and status: The app is under an Enterprise dev account. The app has Push Notifications, Remote Notifications and Voice over IP entitlements selected, among other, unrelated (I think) items. On launch, the app successfully registers via PushKit and gets back a valid device token. This token is copied from the Xcode console, and used to send VOIP pushes via the iCloud push console: https://developer.apple.com/notifications/push-notifications-console/ Results: For a debug build loaded onto a physical device, the push console reports successful delivery of the VOIP push to the device. However, VOIP pushes are only received by the app when it is in the foreground. If the app is in the background or not running, it is not woken/launched. The docs mention the need for a special VOIP push certificate, but my understanding is that is required between my server and Apple's servers. Since I am using the push console, I assume that removes the need for the certificate. So, what am I missing?
2
0
1k
Jun ’24
Cannot get PushKit to register for Watch app
Here is the code: let pushRegistry = PKPushRegistry(queue: .main) func applicationDidFinishLaunching() { pushRegistry.delegate = self pushRegistry.desiredPushTypes = [.complication] } func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) { let token = pushCredentials.token.reduce("") { $0 + String(format: "%02x", $1) } print(token) } The watch extension has push notifications capability, and the delegate is never called with the pushCredentials.
10
0
704
Jun ’24
Push notification not working with production environment
Hey Team, We're experiencing an issue where push notifications are failing to deliver to certain devices in the production environment. However, they are working fine in the development build on specific devices. Interestingly, the notifications are working fine for a few devices in the same production environment. In the affected devices we have attempted the following things to resolve the issue Verify the device token (& send the notification through apple push notification console) reinstall the application reboot the device Below are the device details Model - Macbook Pro 15-inch, 2018 processor - 2.9 GHz 6-Core Intel Core i9 OS Version - macOS Sonoma 14.2.1 I have attached the APSD process console log for the affected device. In which we are getting following error. apsd Peer connection [pid=472] lacks APSConnectionInitiateEntitlement APSD_ConsoleLog.txt Thank you all in advance for any information regarding this issue and we will provide any additional information if needed.
1
0
509
Jun ’24
If you need assistance debugging your push notification issues
Delivery issues with push notifications can usually be determined by examining the responses from APNs. APNs will return useful information both in the HTTP/2 header response, and as a JSON dictionary for unsuccessful requests. You can find the list of responses, and further troubleshooting steps in the article Handling Notification Responses from APNs: If the above document does not help clarify the issue, or issues with receiving notifications persist despite receiving an error status neither in the HTTP/2 headers nor in the response JSON dictionary, we may be able to assist you with diagnosing the issue. If you are using a third-party push notification provider service, we recommend to contact them first to make sure the issue is not between your app and their service, and to obtain information on any errors they might be receiving from Apple servers. To help diagnose the issue, we will need some information about the push requests. Please include the following information in your post, for a failed or delayed notification that has been attempted within the last 48 hours: The following are required to start a diagnosis: Exact time and date (including time zone) of the push request sent Exact time and date (including time zone) of the notification received by the device (if received at all) Your app’s Bundle ID The token the push was sent to The returned (error) status and message from APNs Full contents of the HTTP/2 headers Full contents of the payload The following are helpful for timely and accurate diagnosis of the issue: If using your own server to send: the public IPv4 address of the push provider server used to send the push If using a third-party service to send: the name of the third-party push provider service used The push topic (apns-topic header value) The push type (alert, background, VoIP, other) The apns-id (either set in your request, or received from the HTTP/2 header response) Any logging you have from the server side that shows the interaction with it and APNs If you are using a third-party push provider service, and do not have the above necessary info, or only have the info you are providing to the service, please first contact the service provider for a resolution or to give you the above specific information. When posting about an issue you are having with sending/receiving push notifications, include the above required information and as much of the secondary helpful information you can collect with your post in an organized manner for us to be able to help with diagnosing the issues.
0
0
510
Jun ’24
Do remote notifications work on macOS when app is closed?
I have a native SwiftUI Mac app which is based off my iOS app and includes Core Data with iCloud sync. As per my understanding, when a user makes a change on one of the devices a remote notification is sent to the others. I have a widget which displays information from Core Data and the remote notification makes the widget update its information on the next timeline refresh without the user having to open the app manually. My question is, if an app is closed on macOS so it's not even running in the Dock, do remote notifications work? This page says "the delegate receives this message when the application is running and a remote notification arrives for it". Does that mean the app won't receive remote CloudKit notifications when closed on macOS?
1
0
442
May ’24
Start live activity with push notification problem
Hey there, i implemented live activity in my app and iam trying to start the live activity from push notification, updates works fine even when the app is in background but starting the activity creating issue mostly on background and kill mode when i check the delivery of live activity on cloudkit console it says stored for device power considerations. anyone having the same issue ?
0
0
447
May ’24
iOS data push banner not displayed anymore after 2 days the app is not opened
Hello all. I've been asked to add data push notifications to an iOS app, and that is working good. It must be a data push as my banner must show user icon, not app icon (like WhatsApp and Telegram). So the notification banner is showing, until the app is opened or it's been closed less than 2 days (more or less) ago. After (about) 2 days, the push banner is not displayed anymore. Did never had this problem when I was using "normal" notifications. BTW, the banner is displayed as I open the app. Any thoughts? "Remote notifications" background mode is already activated. I'm using Firebase Cloud Messaging, if it can help. application:didReceiveRemoteNotification:fetchCompletionHandler is implemented. Push msg has "aps": { "content-available": 1 }, in the correct place. Thank you
1
0
649
May ’24
Question about Live Activities Update Mechanism with Push Notification Permissions Turned Off
I have a question regarding the Live Activities feature introduced in iOS 16.1. According to the documentation, Live Activities can be updated via push notifications. However, I am curious to know if Live Activities can still receive updates via push notifications when push notification permissions are turned off for an app. Could you please clarify whether Live Activities updates are independent of the push notification permissions setting, and if so, how the update mechanism works in this scenario? Thank you for your assistance. Best regards,
1
0
429
May ’24
Push Notifications
Hi, I am trying to add in a push notification but the send push notifications function does not seem to be working. Can someone help? func sendNotification() { print("Bluetooth device disconnected. Sending notification.") let content = UNMutableNotificationContent() content.title = "Car Disconnected" content.body = "Please key in where you have left your car" content.sound = UNNotificationSound.default // Create a trigger to send the notification immediately let request = UNNotificationRequest(identifier: "BluetoothDisconnected", content: content, trigger: nil) UNUserNotificationCenter.current().add(request) { error in if let error = error { print("Error adding notification request: \(error.localizedDescription)") } else { print("Notification request added successfully.") } } }
1
0
443
May ’24