The Main Thread Checker is complaining about the UIApplication.shared.registerForRemoteNotifications() is being called from a background thread. According to the stack trace I can see it's being called from the callback after checking if the UNNotificationCenter is authorized (UNAuthorizationStatusProvider.current.isAuthorized).
I found this piece in the PushNotificationManager where you call the UIApplication.shared.registerForRemoteNotifications() in the completion handler. This is not guaranteed to be called on the Main Thread so it should be wrapped in a DispatchQueue.main.async {} or similar.
The Main Thread Checker is complaining about the
UIApplication.shared.registerForRemoteNotifications()
is being called from a background thread. According to the stack trace I can see it's being called from the callback after checking if the UNNotificationCenter is authorized (UNAuthorizationStatusProvider.current.isAuthorized
).I found this piece in the
PushNotificationManager
where you call theUIApplication.shared.registerForRemoteNotifications()
in the completion handler. This is not guaranteed to be called on the Main Thread so it should be wrapped in aDispatchQueue.main.async {}
or similar.From Xcode: