应用关闭,收到推送,点击通知,进不去app
// 获取推送消息
let remote = launchOptions?[UIApplicationLaunchOptionsKey.remoteNotification] as? Dictionary<String,Any>;
// 如果remote不为空,就代表应用在未打开的时候收到了推送消息
if remote != nil {
// 收到推送消息实现的方法,此方法在应用未打开时操作
self.perform(#selector(AppDelegate.receivePush(_:)), with: remote)
}else{
self.loadHomeVC()
}
应用关闭,收到推送,点击通知,进不去app,不走这个self.perform(#selector(AppDelegate.receivePush(_:)), with: remote)方法