SwiftUI get deviceToken without AppDelegate

Hi community:

I'm looking for a way to remove AppDelegate from my app because I'm only using it to get the push device token to share with my server.

Is there a way to get it without implementing AppDelegate or its protocol?

Thanks in advance

SwiftUI get deviceToken without AppDelegate
 
 
Q