Info about "requesting permission"
The problem is they both needed in the same code but they are split into 2 separate articles. So it is unclear how to deal with them simultaneously and what is the difference between them (of course except of input params).
The code I found just calls these functions sequentially:
UNUserNotificationCenter.current().requestAuthorization(options: authOptions, completionHandler: { granted, error in
...
})
UIApplication.shared.registerForRemoteNotifications()
Is it correct? And what is the difference between these methods?
P.S. I also can't simply place them inside application:didFinishLoad:
according to the documentation because the app shouldn't request permissions from the very first run.