userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler
用於獲取iOS中10條通知的答覆,誰能告訴我怎麼去應用國呢?
由於iOS的9或以前我用過的
application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
在這種方法中,我們可以通過
application.applicationState
感謝您的幫助獲取應用程序的狀態。
那裏是第三個狀態 - UIApplicationState.Inactive,與Background有點不同,也就是應用程序被強制關閉時的狀態。任何想法我們如何檢查UNUserNotificationCenter –