Posts

Post not yet marked as solved
2 Replies
985 Views
I'm running an iOS one-time password (OTP) application, and a corresponding MacOS companion app. In the iOS application, users are able to tap on one-time passwords, resulting in the iOS application sending an HTTP request to my server. My server in turn, will send a push notification to the MacOS application, containing the tapped one-time password. All encrypted of course, but that's irrelevant for the issue. iOS application (user taps one-time password) HTTP request (iOS application sends HTTP request to my server) My server (my server sends HTTP request to APS) APS (APS sends notification to MacOS application) MacOS application (MacOS application puts one-time password on clipboard) Recently, after users started upgrading to MacOS Ventura, the MacOS application stopped receiving notifications for some users. I can see (and I've verified) that the process from the iOS application to the server, to APS works. APS returns a 200 OK success status, indicating that the push notification was sent to the MacOS device. However, in my MacOS application the notification is not received in the didReceiveRemoteNotification function (which I included below). func application(_ application: NSApplication, didReceiveRemoteNotification userInfo: [String : Any]) { NotificationHelper.shared.notify(userInfo) log.verbose("Received a remote notification in the application delegate.") } The didRegisterForRemoteNotificationsWithDeviceToken function does work, and I can see it succeeded because of my applications' debug logging. func application(_ application: NSApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { settingsView.pushToken.data = deviceToken linkingView.pushToken.data = deviceToken log.verbose("Successfully completed APNS registration process.") } I've verified that I'm using an actual production key for APS, and that the MacOS application itself is a production build as well (or well, TestFlight in my case). I used the same production key and build before users started upgrading to Ventura, and it always worked (and still works for some users). What's interesting is that, although I can't see anything in Xcode or in my debug logging of the production build of the app, the Console.app of MacOS does show the push notification being received. I've included some of the Console.app APS logging (from when a notification should be received in my MacOS application) in the attachments. There are two lines that caught my eye, and those of some other users of my app debugging the issue. These are also included in the attachments. However, searching for these specific errors from the logging on the internet does not yield any (helpful) results. Therefore, I would like to ask you for help! For users of my app where push notifications are working, I've also included an attachment of the logging. Any ideas on why I'm not receiving these notifications correctly in my MacOS app are welcome. Hopefully we can get to a solution. Console.app logging (notification failure) Console.app logging (notification failure filter) Console.app logging (notification success)
Posted
by tijme.
Last updated
.