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

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
210
3w
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
130
3w
Help Needed: Implementing a Countdown Timer Live Activity with Push Notifications
Notifying the Live Activity When Countdown is Complete: Once the countdown timer reaches zero, how do I notify the live activity? What is the best approach to ensure the live activity updates accurately and promptly? Handling App Suspension in the Background: When my app is in the background, it gets suspended. Should I set up a job queue on the backend to send an update push notification when the timer ends? Is there a more efficient way to handle this? Ensuring Timer Accuracy: Since this feature deals with time, I am concerned about the accuracy of the timer. How can I ensure the countdown timer remains accurate even when the app is not in the foreground? Any answers, insights, or guidance on these issues would be greatly appreciated. Thank you in advance for your help!
1
0
265
4w
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
214
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
252
May ’24
Could not download iOS 17.5 Simulator The network connection was lost
I tried many time to download iOS 17.5 Simulator for Xcode 15.4 but I did not succeed I got this error what is the solution Could not download iOS 17.5 Simulator (21F79). Domain: NSURLErrorDomain Code: -1005 Recovery Suggestion: The network connection was lost. User Info: { DVTErrorCreationDateKey = "2024-05-26 00:23:57 +0000"; DVTRecoveryBlockKey = "<NSGlobalBlock: 0x106443bf8>"; NSLocalizedRecoveryOptions = ( Cancel ); NSRecoveryAttempter = "<_DVTErrorRecoveryHandler: 0x600003e1cd70>"; } Could not download iOS 17.5 Simulator (21F79). Domain: NSURLErrorDomain Code: -1005 Recovery Suggestion: The network connection was lost. User Info: { DVTRecoveryBlockKey = "<NSGlobalBlock: 0x106443bf8>"; NSLocalizedRecoveryOptions = ( Cancel ); NSRecoveryAttempter = "<_DVTErrorRecoveryHandler: 0x600003e1cd70>"; } System Information macOS Version 14.5 (Build 23F79) Xcode 15.4 (22622) (Build 15F31d) Timestamp: 2024-05-25T20:23:57-04:00
1
3
710
May ’24
Provisional Notifications missing buttons
We are attempting to enable provisional notifications in our app, but some internal users on iOS 17 are reporting that they are not receiving the "Keep" and "Turn off" buttons that provisional notifications are supposed to have - in other words they just come in as regular quiet notifications. I have confirmed that these users are doing a fresh install of our app, and at no point are they ever receiving a permission prompt to turn on notifications. Their UNAuthorizationStatus is correctly being set to provisional. Their notification settings are being set to the following, which seems correct: I have not been able to reproduce this issue on any of my own devices, but these users can do so consistently. What could possibly cause this? Some misconfiguration on our end, our some hidden iOS setting somewhere?
1
0
231
May ’24
MDM Failure
Im using server V5.8 in Mojave that has worked so well until last week that I cannot entoll new devices or push apps to pupils iPads. I have tried everything even reenrolling devices but still no communication from the mobile device management server to the iPads. Please help as I have 50 new iPads for a new class that I need to enrol.
1
0
206
May ’24
How to open app and show persistent notification upon receiving push notification on iOS
Hello everyone, I am developing a feature in my app where, upon receiving a push notification, the app should open automatically if it is closed and the screen is locked. If the device is unlocked, a persistent notification should appear and only be removed with user interaction. We managed to implement this functionality on Android using some configurations and additional rules. With this, upon receiving a push notification, the app opens automatically or a permanent notification appears. I would like to know how I can implement this functionality on iOS using Swift. Is there any specific configuration or API that allows the app to open automatically upon receiving a push notification or to display a persistent notification on the unlocked screen? Thanks in advance for your help!
1
0
247
May ’24
Get rid of the task time displayed by the system
When I run my app in debug mode, whenever a time consuming task is run (like a core data fetch request) there is a time indication appearing on top of the view. I am unable to find the meaning of this and how it is named. It looks like: "appName NNNN ms" (it is not caught by the screen shot) Can someone tell if it is possible to get rid of it and how ? Thanks for your help !
1
0
304
May ’24
Firebase Cloud Messaging : Can't receive token
Hi everybody, I'm trying to implement Firebase messaging into a new iOS app. I've done everything (add Background Mode and Push Notification capabilities, import my key into FIrebass, ...) as describe in different tutorials that I founded on internet. The fact is that the console doesn't show me a token.. Does someone has an idea ? Here's my code : // pushnotifApp.swift // pushnotif // // Created by Thibault COLLIN on 13/05/2024. // import SwiftUI import FirebaseCore import FirebaseMessaging import UserNotifications class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { print("Application did finish launching") FirebaseApp.configure() Messaging.messaging().delegate = self UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current().requestAuthorization(options: authOptions) { (granted, error) in if granted { print("Notification authorization granted") DispatchQueue.main.async { application.registerForRemoteNotifications() } } else { print("Notification authorization denied") } } return true } func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { print("Firebase registration token received: \(String(describing: fcmToken))") } } @main struct pushnotifApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate var body: some Scene { WindowGroup { ContentView() } } } And the console result : Application did finish launching 10.26.0 - [FirebaseMessaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at: https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging to ensure proper integration. Notification authorization granted
1
0
327
May ’24
Silent notification/ Blank Push Notification not updating pass added to Apple Wallet
Hey everyone, I've noticed a recent issue in my app where users are not receiving automatic updates/ blank push to the pass added to the user wallet. Instead, they have to manually refresh the pass by dragging down the back of the Apple Wallet to see any updates. This might be because the blank push notification is not updating the passes. If you've encountered this problem or have any insights into what might be causing it, I'd love to hear from you. Your feedback is invaluable to me.
0
0
267
May ’24
Error event - Minimed Mobile App . Triggered by insufficient update interval of the Watch iOS system of only 50 updates/day problem with update interval of the Apple Watch iOS
Criticism of the use of the Minimed Mobile App, problem with the update interval of the Apple Watch iOS Subject: Error event - Minimed Mobile App . Triggered by insufficient update interval of the Watch iOS system of only 50 updates/day Dear Sir or Madam, I use the Minimed Mobile App in conjunction with my Medtronic 780 G insulin pump and am generally very satisfied with the app. However, I have noticed a point here that is caused by the Apple Watch iOS operating system. I would like to pass this on and ask that you please fix this problem with an update. Updating the sensor values on watch faces on the Apple Watch I use the Modular widget on my Apple Watch in conjunction with the Minimed mobile app to quickly and easily keep an eye on the current sensor value. Unfortunately, the sensor value in this widget is not updated automatically according to someone in the know, Apple only updates widget information 50 times a day. After a short time, a rotating arrow appears instead of the current value, which I have to press to get a sensor value displayed again in order to see the current value. This is very inconvenient as I have to perform several actions each time to see the current value: 1.Open widget 2.Press the rotary arrow 3.Read the value Close widget by pressing the spin button at the top right to return to the main screen I would very much welcome it if the sensor value in Apple Watch watch faces were updated automatically, the problem is obvious - the watch faces only update 50 times a day. This would prevent me from seeing the current sensor value quickly and easily at any time without having to perform additional and cumbersome actions. The Minimed Mobile App has been tested and approved by Medtronic through Apple. However, it must have been overlooked that this sensor value app updates the sensor value every 5 minutes, but it does not do this on the dial because, according to my friend, it only updates 50 times a day. Now it is the case that the sensor value can change every 5 minutes, but this is not shown on the watch face, which means that the Apple Watch iOS would need 288 updates for this Minimed Mobile App per day instead of only 50 updates per day. Can you please advocate for a new update that allows an update interval of up to 288 updates per day? So that thousands of diabetics worldwide can see current values on their Apple Watch dials at any time? Without having to take several steps each time? I switched to I Phone and Apple Watch because I thought this would be possible for me. I would be very happy to hear back if this is technically possible for all diabetics worldwide who will benefit from it. With kind regards
2
0
307
May ’24
ios push notification not received after getting out of airplane mode
I'm sending a push notification using Noticed Gem during the night when my phone is in airplane mode. When I wake up and disable the airplane mode, I don't get the push notification. These are the settings: ` def ios_format(apn) apn.custom_payload = { universal_link: url } apn.alert = { title: title(recipient), body: message(recipient) } apn.sound = 'default' apn.priority = '10' # Send immediately, bypassing the end ` default expiration is supposed to be 30 days. How can I debug/fix the problem? (with noticed gem) I checked Apple consoleKIT, and I don't see discarded notifications. Thanks
3
0
391
May ’24
Keeping the app stay connected to TCP server even if it is in background
Hello, We have an iOS application (navigation/mobility app) that we need to have it stay connected to TCP server even app is in background. We tried disabling screen lock. We tried having location permission as "always". But it is not consistent. Usually, after 15 minutes, TCP connection is disconnected. We are unable to run code on app's side if it is in the background. Our other workaround option is similar to WhatsApp or what every other companies / our rivals in the market do. Have a VOIP feature, use voip notification to wake up the app. But we really don't want to do that sort of thing. Any feedback and any ideas are welcomed. Thanks.
0
0
289
May ’24
Got a duplicate push notification not every time
Hey A lot of our customers got duplicate push messages twice or more times But we sent only once per push tokens Additionally, devices experiencing the same happens receive similar push messages twice or more from other companies' application This happens is especially reported on devices that have upgraded from iOS 16 to 17. Is there something wrong with the APNS? It
0
0
210
May ’24
apn-environment in Testfligh stuck on Production
Steps to reproduce: Install & Launch App When push notifications are registered, the push notification token received is a "production" push notification token rather than a "development" push notification token. We are trying to test on the sandbox environment with development push notification tokens, however the apn-environment for all builds we release via TestFlight are being set to "production". We wish to distribute builds via TestFlight with apn-environment set to "development". At the moment we have only found one way to run the app with apn-environment set to "development" which is to "Export" a Debug build, then manually install it on a device via iTunes on Windows machines. This method is not efficient or considered seamless enough for non-technical testers and stakeholders. They require a seamless way to receive Debug builds via TestFlight without resorting to other third-party platforms which allow us to manually upload the "Exported Debug build". If anyone knows how to upload a "Debug" build to Testflight which will allow the user to receive a sandbox development push token with "apn-environment" set to development I would really appreciate it.
1
0
270
May ’24