Eliasz Sawicki

Eliasz Sawicki

iOS developer from Gdansk

EventKit - Gaining access to calendar events

- 1 min

If you want to gain access to your calendar events it’s time to use EventKit. EventKit allows you to do multiple operations with calendar events and reminders. In this post I will cover gaining access to existing events in your calendar.

Getting access to events in your calendar

In order to get desired access you need to follow a few basic steps.

  1. Your app needs to gain access to calendar. This code will show the alert to a user when app is opened for the first time. You can always change it in app’s settings later on.

  2. Getting a list of calendars available on your device. Using this method you will get an array of ‘EKCalendar’ type objects.

  3. Getting events from your calendars. This way you get array of EKEvent objects describing events in your calendar.

comments powered by Disqus
rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora