Post

Replies

Boosts

Views

Activity

Reply to Scheduled local notifications mysteriously disappearing
@funju, yes I did but it was just me overlooking older code. Basically a long time ago in the app I had a simple timer notification and if the user cancels it I naively removed the pending notification by calling: UNUserNotificationCenter.current().removeAllPendingNotificationRequests() Which unscheduled all notifications, including the ones that were "mysteriously" disappearing. It's unlikely but I'd suggest doing a simple search of your code base to make sure that isn't being called. So it was an easy fix by replacing that line with: UNUserNotificationCenter.current().getPendingNotificationRequests { requests in let timerRequests = requests .filter({ $0.content.categoryIdentifier == self.timerNotificationCategoryIdentifier })   .map({ $0.identifier }) UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: timerRequests) }
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’22
Reply to Springboard crash when trying to add Control Widget
FB15191457
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to NSPersistentCloudkitContainer Memory Leak -> Crash? (iOS 15 beta 4 & 5)
Still seeing this in iOS 17
Replies
Boosts
Views
Activity
Aug ’24
Reply to PHPicker: Cannot load representation of type public.movie
I'm having the same issue, any update?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Could not load some videos
Any solutions? I also have this issue.
Replies
Boosts
Views
Activity
May ’24
Reply to Scheduled local notifications mysteriously disappearing
@funju, yes I did but it was just me overlooking older code. Basically a long time ago in the app I had a simple timer notification and if the user cancels it I naively removed the pending notification by calling: UNUserNotificationCenter.current().removeAllPendingNotificationRequests() Which unscheduled all notifications, including the ones that were "mysteriously" disappearing. It's unlikely but I'd suggest doing a simple search of your code base to make sure that isn't being called. So it was an easy fix by replacing that line with: UNUserNotificationCenter.current().getPendingNotificationRequests { requests in let timerRequests = requests .filter({ $0.content.categoryIdentifier == self.timerNotificationCategoryIdentifier })   .map({ $0.identifier }) UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: timerRequests) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’22