In a previous blog post, I took you through how to pull contacts from iOS or Mac. In this post, I will show you how to pull calendar items. This turns out to be very similar to pulling contacts.

First, we must request access to the calendar.

As part of requesting access, we must create a string in our file for the text that shows when we request access to the calendar.

Creating a string in our file

Second, we need to create a predicate for your query.

Third, we run the query.

Accessing the calendar is pretty straightforward, and the code is pretty much the same as accessing contacts. Using the code above hopefully gets you started pulling some calendar items.

Full Source


Looking For More?

Sign up to receive useful software development tips and news from the Don't Panic Labs team.

You have successfully subscribed!

Share This