Send push notifications to Mac, iOS, iPadOS, tvOS devices through your app using the Apple Push Notifications service (APNs).

Posts under APNS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Question about Wallet notifications
Good afternoon) Could you please advise, I need to issue a Wallet-a card with a description of the bonus program for a certain store. I also need to organize sending a unique push to the user's devices if the user's points are burned. Can you please tell me how I can send a unique message to the customer in such a case? Will it be a card update? Java Server Card generation via server
1
0
97
2w
Does Live Activity always receive updates for pushToStartTokenUpdates and activityUpdates?
Our context involves smart kitchen appliances, where cooking may be initiated by an app or directly by the device. When the app is not running, we can only start a Live Activity through a remote push notification. However, an increasing number of users report issues where they cannot update or terminate the Live Activity. While we can reproduce this issue in some cases, it is inconsistent and lacks a clear pattern. I have a sample project and would like to confirm the following questions: When the app is not running, does each pushToStartToken update wake the app and reliably trigger the callback below? for await pushToken in Activity<DeviceAttributes>.pushToStartTokenUpdates { } When the app is not running, does each pushTokenUpdates update wake the app and reliably trigger the callback below? Task { for await activity in Activity<DeviceAttributes>.activityUpdates { Task { for try await tokenData in activity.pushTokenUpdates { } } } } Must pushToStartTokenUpdates and pushTokenUpdates be placed directly in application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?), or can they be in another wrapper, such as an RxSwift wrapper? If pushTokenUpdates is updated, but the received pushToken fails to synchronize to the server due to network issues, how should this be handled? Alternatively, if you have any better suggestions, I would be very grateful to hear them. Here is a simple example.
1
0
73
2w
Regression: iOS 18.2 heavy delay of local push notifications (even time sensitive notifications)
Hello! I am working on an app that requires to send a local push notification to the user from an app extension (from the ShieldActionDelegate to be precise). This is suggested by DTS as a workaround for this issue: https://forums.developer.apple.com/forums/thread/766644 But now, on the iOS 18.2 beta, local push notifications are delayed by up to 10 seconds, even though the push notification is classified as .timeSensitive, leading to a very bad user experience (where to user has to sit and wait for the notification to arrive without knowing how long it will take). This only happens when Apple Intelligence is turned on. This had happened previously on the iOS 18.1 beta but was fixed for the final release: https://forums.developer.apple.com/forums/thread/764848 But now the issue came back on the latest iOS 18.2 beta. I have documented the new behavior in FB15668616 Any help is appreciated!
2
3
524
2w
iOS Simulator Safari JS PushManager.subscribe(...) empty keys
When I run the following code in XCode iOS Simulator on Safari (connecting via Safari DevTools): navigator.serviceWorker.ready.then((reg) => reg.pushManager.subscribe({ userVisibleOnly: true, applicationServiceKey: "..." }).then((sub) => console.log(sub.toJSON()))) I get the response: { keys: { p256dh: "", auth: "" } } But I'm expecting p256dh and auth (and endpoint) to be filled out. Why is it not?
0
1
145
2w
Help me to understand sending push to Wallet card
Good afternoon) I am doing one of the test projects to create a PKPASS and a server to update this file on the device, as well as sending PUSH-a. APN service is used with JWT Bearer token. The server is written in Java Springboot. We try to send push notification, pkpass update happens, response from APN 200 OK. But there is no notification, can you please tell me why this is happening? I am also sending you a sample request: curl -v -X POST -H "apns-push-type: alert" -H "apns-id: 5af474c5-a212-42f3-9f99-70a9e587e1e2" -H "apns-topic: pas.example225" -H "apns-expiration: 0" -H "authorization: bearer eyJraWQiOiJGQ0pQVFFMV1ZNIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiI2N0ZGUTY1TEQzIiwiaWF0IjoxNzMwMzY3NzQ4fQ.FGXSLCR6mxkQyi7bNliZKZbVdN3m0xQzFSMUDRFU4aAYIgsgflk5MDEkS9k5riMHp10wpr80b20uq9cuPnoQqw" --data '{"aps":{"alert":{"title":"title","subtitle":"subtitle","body":"body"}}}' \ P.S. I checked JWT on the page: https://icloud.developer.apple.com JWT was built correctly. Thank you for your reply) Translated with DeepL.com (free version)
1
0
137
2w
Does Safari Web Push require a paid Apple Developer account (doubt with certificate)?
I need to implement push notifications in Safari. I already have a web app that can be added to the home screen. When researching push notifications in Safari, one of the things I found was that you don't need to be part of the Apple Developer Program to use this feature (text here). But when checking the requirements within the platforms, such as Pusher, they require a type of certificate that can only be generated with a paid account, that is, I need to participate in the Apple Developer Program. Pusher documentation: https://pusher.com/docs/beams/getting-started/web/configure-safari/ Now, I have many questions: Do I really need a paid account to issue the certificate? Can I issue the certificate via the web or only on a Mac? Do I really need this certificate?
1
0
164
2w
Firebase Cloud Messaging Campaigns Not Delivering Notifications to iOS App
I’m having an issue with Firebase Cloud Messaging (FCM) where direct messages sent via the FCM token work perfectly, but notifications from Firebase Messaging Campaigns don’t reach my iOS app. Here’s what I’ve tried and confirmed so far: Setup & What’s Working: Direct Messages via FCM Token: These are received by the app without any issues. Notification Permissions: All necessary permissions are granted on the device. APNs Authentication Key: This is configured in Firebase, and the Firebase Console shows the campaign status as “Completed,” but messages don’t appear on the target device. My Steps: Uploaded the APNs Authentication Key in Firebase: Opened Apple Developer Console > Certificates, Identifiers & Profiles > Keys > Registered a New Key > Checked APNs service. Downloaded the APNs Key and uploaded it to Firebase under Project Settings > Cloud Messaging. Firebase Console Campaign Setup: Notification title and body are configured. Target set to “All Users” (for testing purposes). Message settings: sound enabled, Apple badge enabled, badge count set to 1, expiration set to 4 weeks. Code Setup (relevant parts): Using Firebase for authentication and data storage with Firestore. Configured AppDelegate for Firebase, FCM, and APNs token registration. Implemented UNUserNotificationCenterDelegate methods to show notifications when the app is in the foreground. Observed Behavior: The Firebase Console indicates the campaign is “Completed,” but the messages are not received on the device. There are no errors in the Firebase Console or my Xcode logs when sending the campaign. My AppDelegate is correctly handling the APNs token and FCM token registration. Here’s My Code Setup in AppDelegate: class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { FirebaseApp.configure() Messaging.messaging().delegate = self UNUserNotificationCenter.current().delegate = self UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in if granted { print("Notification permission granted") } } application.registerForRemoteNotifications() return true } func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Messaging.messaging().apnsToken = deviceToken } func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { print("FCM Token received: \\(String(describing: fcmToken))") } func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { completionHandler([.alert, .badge, .sound]) } }
0
1
168
3w
Inquiry About Upcoming Changes to APNs Certificates
Hello, I’m reaching out to gather information regarding the upcoming changes to APNs certificates that are set to be implemented in the beta at the end of January 2025. Specifically, I would like to understand the following: What will be the practical impact of these changes on apes apis ? What actually needed to be done at trust store for this changes, and how will it affect our current setup? What steps do we need to take to update the certificates on our servers? it’s crucial for us to address these changes in advance and keep our customers informed. Thank you for your help!
2
0
265
1w
Assistance Required: Invalid CSR File Format While Uploading to APNs
Dear Apple Developer Support Team, I hope this message finds you well. I am currently utilizing the services at https://identity.apple.com for mobile device management and encountered an issue while attempting to upload a Certificate Signing Request (CSR) file to the portal. The system generated an error indicating that the file format was invalid. Below are the steps I followed to generate the CSR: I first created a private key on my server using the following command: openssl genrsa -out private.key 2048 Next, I generated the CSR file with the following command: openssl req -new -key private.key -out request.csr Despite following these steps, I could not successfully upload the CSR file and obtain the APNs certificate. I would greatly appreciate your guidance on creating and uploading a valid CSR file to avoid this error. Please let me know if there are any specific formatting requirements or additional steps I need to follow. Thank you in advance for your assistance and support.
4
0
281
3w
Sandbox push server down again?
Over the past few weeks I've seen several people mention pushes sent via the sandbox haven't been getting delivered. Today I'm also seeing that (though pushes sent via production are fine). So it would appear to be down again. What's going on recently, any reason it's so unstable these last few weeks?
1
0
145
4w
Watch OS Push notification
Hey there, i created a independent Watch OS app and I configure push notification there. so on watch simulator I am able to get push notification every time. but today I test watch app to my real watch series 6 WatchOS 11. I got the permission alert I allowed it, and I am able to get the device token as well now if I try to send push notification to my real watch app I get this logs. Oct 22, 2024, 11:09:12.024 AM GMT+5 received by APNS Server Oct 22, 2024, 11:09:12.334 AM GMT+5 discarded as application was not registered why is that ? is there any body know's ? why i am not receiving remote notification on my real watch instead i get that my application is not register...
4
0
219
4w
Apple Push Notification service server certificate update
Regarding the latest news from apple below. I am not able to understand what exactly needs to be done. I can download RSA certificate from the link given but to include it in Trust store is something i am not able to get. can someone help me out here? " 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 February 24, 2025. All developers using APNs will need to update their 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."
0
4
208
Oct ’24
Apple Push Notification service server certificate update
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 February 24, 2025. All developers using APNs will need to update their 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.
0
0
277
Oct ’24
Unable to create APNs key
I am unable to create a private key to access APNs services from the Developer Portal (developer.apple.com). I take the following steps: Sign in to developer.apple.com Go to Keys (https://developer.apple.com/account/resources/authkeys/list) Click "Create a key" Check the enable box in front of "Apple Push Notifications service (APNs)" A message in red shows up in the same table row: "This service must have one identifier configured.". A "Configure" button appears. Click on the configure button A new page loads at the following URL (https://developer.apple.com/account/resources/authkeys/add) displaying an error dialog with the text: "Unexpected error occurred An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support. https://developer.apple.com/support" I contacted support but that might take ages. Error in browser console is as below for this URL: https://developer.apple.com/services-account/QH65B2/account/auth/key/realms/list { "responseId": "a204b125-f8c2-44f2-82f3-269a2e35265c", "resultCode": -1, "resultString": "Unexpected error occurred", "userString": "An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support. https://developer.apple.com/support", "creationTimestamp": "2024-10-16T11:51:41Z", "protocolVersion": "QH65B2", "userLocale": "en_US", "requestUrl": "https://developer.apple.com/services-account/QH65B2/account/auth/key/realms/list", "httpCode": 200 }
14
11
702
Oct ’24
Unexpected error occurred
I am trying to create new key for apple APN , I find out there is a new option "configure" to add identifier for the key or something . anyway when I click on it to configure the key I am getting error popup : An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support. https://developer.apple.com/support any ideas ?
6
11
431
Oct ’24
Critical alerts on CarPlay don't open the app on tap events
Hello, I'm trying to use critical alerts on the CarPlay, but I'm facing couple of issues: Sound of critical alerts is not played by the CarPlay's speakers (played by the iPhone's speakers) Tapping on a critical alert doesn't open the app like other notifications. Critical alerts of the app are always shown if the CarPlay is connected, even if the app doesn't have the CarPlay entitlement. didReceive is not called if the user taps on a notification on the CarPlay. Any help would be greatly appreciated
1
0
188
Oct ’24