如何在 iOS 中檢視狀態列中啟用的通知?
要獲取狀態列托盤中啟用的通知列表,我們將使用 getdeliverednotifications,你可以在此處閱讀更多相關資訊。
https://developer.apple.com/documentation/usernotifications/unusernotificationcenter
儘管大家都知道我們無法獲取所有應用程式的通知,因為這會違反隱私,但我們可以獲取我們應用程式的通知
Apple 提供 getDeliveredNotifications(completionHandler:)
它將返回仍然顯示在通知中心中的應用程式通知列表。
你可以根據自己的需求編寫以下程式碼。
UNUserNotificationCenter.current().getDeliveredNotifications { (notifications) in
print(notifications)
}
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP