title: UIApplication.registerForRemoteNotifications() must be called from main thread only
body: <p>Xcode 9 (iOS 11) showing me an error/warning while registering for Push (remote) notification.</p>
  
  <p>Here is error message</p>
  
  <p><a href="https://i.stack.imgur.com/GY0iw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GY0iw.png" alt="enter image description here"></a></p>
  
  <p>And here is code, I've tried:</p>
  
  <pre><code>let center  = UNUserNotificationCenter.current()
  center.delegate = self
  center.requestAuthorization(options: [.sound, .alert, .badge]) { (granted, error) in
          if error == nil{
                UIApplication.shared.registerForRemoteNotifications()
          }
   }
  </code></pre>
  
  <p><strong>Error/Warning Line:</strong></p>
  
  <blockquote>
    <p>UIApplication.shared.registerForRemoteNotifications()</p>
  </blockquote>
  
  <p>How to resolve this?</p>