re iPhone 'Event Kit':
How can I specify additional search filters (per doco here) for a fetching calendar items, beyond the limited options of just start & end date mentioned in the doco? (e.g. all events occurring on Mondays, or with title matching xxx)
Or is it a given that there are no such capabilities beyond what is available in predicateForEventsWithStartDate:endDate:calendars: , hence you need to bring in all events and then iterate through them yourself?
To begin customizing the iPhone calendars, enter the Calendar app and tap Calendars at the bottom of the screen. The list of existing calendars and color codes will appear. To add a calendar tap Edit at the top left of the screen. Touch Add Calendar at the bottom of the list of existing calendar categories.
To turn Events Found in Mail on or off, open Settings. Tap Mail, Contacts, Calendars. Scroll down and found Events Found in Mail. Toggle it on for automatic mail events added to Calendar app and off for manual input.
The documentation has a clear answer to your question. See the notes for the eventsMatchingPredicate:
method:
predicate The search predicate. Must be created with the
predicateForEventsWithStartDate:endDate:calendars:
method.
Since that method does not allow you to give any other criteria than the dates and the calendars to search in, those are your options. Everything else must be done by iterating over the search results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With