Reputation: 5917
I have a list of EKEvent's for the current day, and I want to filter out any that have been declined by the current user so that the list only contains
How can I do this? I can't find any examples anywhere, or any property on the event itself to store this info.
Here's some sample code, if that helps:
let eventStore = EKEventStore()
let today = Date()
let tomorrow = Calendar.current.date(byAdding: .day, value: 1, to: Date())!
let predicate = self.eventStore.predicateForEvents(withStart: today, end: tomorrow, calendars: nil)
let events = self.eventStore.events(matching: predicate)
// @TODO: Filter events by removing declined events.
Upvotes: 2
Views: 149
Reputation: 8091
you can get the infos via attendees and then participantStatus -> declined
Upvotes: 1