স্ট্যাটাস বারের ট্রে-এ সক্রিয় নোটিফিকেশনগুলোর তালিকা পেতে আমরা getDeliveredNotifications ব্যবহার করব, এর সম্পর্কে আরো জানুন এখানে।
https://developer.apple.com/documentation/usernotifications/unusernotificationcenter
https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/1649520-getdeliverednotifications
সarrakি জানা থাকে যে সকল অ্যাপের নোটিফিকেশন পাওয়া যায় না কারণ সেটি প্রাইভেসি লঙ্ঘন হবে, কিন্তু আমরা আমাদের অ্যাপ্লিকেশনের নোটিফিকেশন পেতে পারি।
Apple প্রদান করে getDeliveredNotifications(completionHandler:)
যেটি অ্যাপ্লিকেশনের নোটিফিকেশনগুলোর তালিকা ফেরত দেয় যেগুলো এখনও Notification Center-এ প্রদর্শিত হচ্ছে।
আপনার প্রয়োজন অনুযায়ী নিচের কোড লিখুন।
UNUserNotificationCenter.current().getDeliveredNotifications { (notifications) in
print(notifications)
}