集成JPush报警告must be used from main thread only
swift: runtime: UI API called from background thread: -[UIApplication registerForRemoteNotifications] must be used from main thread only
runtime: UI API called from background thread: -[UIApplication currentUserNotificationSettings] must be used from main thread only
按照网上说的添加
DispatchQueue.main.async {
JPUSHService.register(forRemoteNotificationConfig: jpushEntity, delegate: self)
}
会收不到推送消息
如果不添加就xcode 报警告
有大神指点怎么做么?