I need to get deviceToken.
When I added push notification to my app I received deviceToken via didRegisterForRemoteNotificationsWithDeviceToken
but now I need to get it again and i didnt save is.
didRegisterForRemoteNotificationsWithDeviceToken
calls just once and other times app runs just registerUserNotificationSettings
I thought to save tokens from all new users to [NSUserDefaults standardUserDefaults]
but it will work just for new ones. What to do with current users?
Add the following code in “didFinishLaunchingWithOptions” method…
Then “didRegisterForRemoteNotificationsWithDeviceToken” method will be called on every call of “didFinishLaunchingWithOptions” during app launching.