Xcode 9 (iOS 11) showing me an error/warning while registering for Push (remote) notification.
Here is error message
And here is code, I\'ve tried:<
This is what worked for me. Courtesy of @Mason11987 in the accepted comment above.
DispatchQueue.main.async() { code }