title: How to handle UIApplicationDidRegisterToRemoteNoticationsWithDeviceToken outside the AppDelegate?
body: <p>I am creating an iOS framework project where I want to register for Apple Push notifications. </p>
  
  <p>I created a sample app and have all the required methods like <code>registerRemoteNotifications</code> in <code>AppDelegate's didFinishLaunchingOptions</code> method. I already implemented the <code>didRegisterToRemoteNoticationsWithDeviceToken</code> method in AppDelegate and it gets the device token upon registration. Everything works well in the sample iOS app. </p>
  
  <p>Now, how do I implement the <code>didRegisterToRemoteNoticationsWithDeviceToken</code> outside of the AppDelegate in a framework project? </p>
  
  <p>For other methods like 'didFinishLaunching', I implemented it through <code>NSNotificationCenter</code> but the equivalent one for remote notifications is deprecated after iOS 8.0 (<a href="https://developer.apple.com/documentation/uikit/uiapplication/1623010-registerforremotenotifications" rel="nofollow noreferrer">https://developer.apple.com/documentation/uikit/uiapplication/1623010-registerforremotenotifications</a>). </p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registerForPushNotifications:) name:UIApplicationDidFinishLaunchingNotification object:nil]; 
  </code></pre>
  
  <p>I am returning to iOS development after a long break so I am kinda lost here. </p>
  
  <p>Please advise, thanks in advance!</p>