Testing macOS push notifications

Hi everyone,

I am having some issues testing our macOS menu bar app that needs push notifications.

I got to make the app ask for permissions but the device token is not being returned.

I have tried so many ways approaching this but the delegate function that returns the device token is not getting called at all.

I am using the AppDelegate lifecycle while my UI is using SwiftUI.

I am running Xcode 12.5.1 (12E507) on macOS Big Sur 11.3.1.

This other post had a similar question but no answer: https://developer.apple.com/forums/thread/673209

My next steps: upgrade to macOS Monterey and update my Xcode instance.

Anyone that has done this who has tips, that will be awesome. Thank you!