I updated my method:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
}
and my token is serialized into a hex. The logs of my job are sayimg that it was executed with no issue:
2025-01-24T01:45:16.343Z pid=104 tid=11a4 class=ApnsNotificationJob jid=93d701749b07ec517c5af0dc INFO: start
I, [2025-01-24T01:45:16.343727 #104] INFO -- : [ActiveJob] [ApnsNotificationJob] [bd0856b9-b4a6-4a64-bf56-2e630903b66a] Performing ApnsNotificationJob (Job ID: bd0856b9-b4a6-4a64-bf56-2e630903b66a) from Sidekiq(default) enqueued at 2025-01-24T01:45:15.648814696Z
I, [2025-01-24T01:45:16.682414 #104] INFO -- : Notification sent successfully to 227 on device ios
I, [2025-01-24T01:45:16.720211 #104] INFO -- : [ActiveJob] [ApnsNotificationJob] [bd0856b9-b4a6-4a64-bf56-2e630903b66a] Performed ApnsNotificationJob (Job ID: bd0856b9-b4a6-4a64-bf56-2e630903b66a) from Sidekiq(default) in 376.5ms
2025-01-24T01:45:16.720Z pid=104 tid=11a4 class=ApnsNotificationJob jid=93d701749b07ec517c5af0dc elapsed=0.377 INFO: done
I checked and I use the aps prod cert, in xcode i enabled push notifications and i set the aps env to prod. I also enabled push notification for the app on testflight
Topic:
App & System Services
SubTopic:
Notifications
Tags: