In swift4
You can solve this issue with
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
Hope this will help…
More Related Contents:
- Enable or Disable Iphone Push Notifications inside the app
- Registering for Push Notifications in Xcode 8/Swift 3.0?
- How do I write dispatch_after GCD in Swift 3, 4, and 5?
- Getting local notifications to show while app is in foreground Swift 3
- Swift 4 “This class is not key value coding compliant”
- What is export * in module.modulemap file inside each framework?
- Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1
- How to send a silent Push Notification payload
- iOS push notification: how to detect if the user tapped on notification when the app is in background?
- navigation bar rightbaritem image-button bug iOS 11
- Swift ios check if remote push notifications are enabled in ios9 and ios10
- It’s possible to change push notification message before display on device from iOS side?
- Unexpected behavior when casting an NSNumber to Float
- Xcode 8.1 Push Notifications in swift 2.3 with firebase integration not getting?
- How to hide UINavigationBar 1px bottom line
- Can’t use Swift classes inside Objective-C
- Move view with keyboard using Swift
- How to have stored properties in Swift, the same way I had on Objective-C?
- How to play a sound using Swift?
- UIBarButtonItem in navigation bar programmatically?
- Writing handler for UIAlertAction
- ios 8 Swift – TableView with embedded CollectionView
- Open UITableView edit action buttons programmatically
- SwiftUI TextField max length
- iOS 14 How to trigger Local Network dialog and check user answer?
- Class has no initializers Swift
- How to split filename from file extension in Swift?
- How to hide the navigation bar and toolbar as scroll down? Swift (like myBridge app)
- Swift + CoreData: Cannot Automatically Set Optional Attribute On Generated NSManagedObject Subclass
- How to implement two inits with same content without code duplication in Swift?