Retrieve the app push token from the device automatically in swift iOS

439 Views Asked by At

Is it possible to get a device token (push token) automatically or without registering for push notification in iOS Swift?

Currently, we are getting device token while registering for push notifications:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    ...
}
1

There are 1 best solutions below

0
Dinesh Kokare On BEST ANSWER

It's not possible. We can not retrieve the app push token from the device automatically or without registering for push notification in swift iOS