How to Make Calendar Event Reminder App Using Event Kit Framework?

To iOS Developers,

Can you set reminders on mobile without using the Reminder app?


Think Again!

Umm… Not Sure?

Ok, let’s clear it.

Yes, you can absolutely create events and set reminders without using a Reminder app.

With Event Kit Framework, it is possible.

Through this tutorial, you’ll see the entire process of how to make calendar event reminder app.

The main purpose of this framework is to provide access to reminder and event calendar app. Because behind these both apps, there is the same database to store the information.

And with this app development framework, you can create, update, delete both, Events as well as Reminders directly through your iOS app.

In this iOS app tutorial, we’ll see how to implement the Event Kit Framework, how to get the access permission, and making a calendar event reminder in iOS app.

Let’s Get Started

Create a new project under the file menu and select “Single View Application”.


In the next tab, name your project demo and click on finish. Here, we’re naming it as SOCalendarEvent.


Now import EventKit and set a static date formatter in “ViewController.swift”

Next, Set outlet of text field and buttons

To fetch events from the calendar, we have to get permission first, call this method from viewDidLoad() in “ViewController.swift”

override func viewDidLoad() {


        // Do any additional setup after loading the view, typically from a nib.



    //MARK: Get Premission for access Calender

    func SOGetPermissionCalendarAccess() {

        switch EKEventStore.authorizationStatusForEntityType(.Event) {

        case .Authorized:


        case .Denied:

            print("Access denied")

        case .NotDetermined:

            // 3

            eventStore.requestAccessToEntityType(.Event, completion: { (granted: Bool, error:NSError?) -> Void in

                if granted {


                } else {

                    print("Access Denied")




            print("Case Default")




Once user allows accessing calendar events, then we will select the start date and end date by date picker and navigate to EventVC.swift class with start and end date.

Call getAllEvents() method in viewDidLoad() of “EventVC.swift” class and save all the data in Array.

let arrEvent = NSMutableArray()

    @IBOutlet weak var tblEvent: UITableView!

    override func viewDidLoad() {


        // Do any additional setup after loading the view.



    func getAllEvents() {


        let eventStore = EKEventStore()

        let calendars = eventStore.calendarsForEntityType(.Event)


        for calendar in calendars {



            let dateFormatter = NSDateFormatter()

            dateFormatter.dateFormat = setDateFormat


            let dateStart = dateFormatter.dateFromString(startDate)!

            let dateEnd = dateFormatter.dateFromString(endDate)!


            let predicate = eventStore.predicateForEventsWithStartDate(dateStart, endDate: dateEnd, calendars: [calendar])


            let events = eventStore.eventsMatchingPredicate(predicate)


            for event in events {

                let dict = NSMutableDictionary()

                dict.setValue(event.title, forKey: "title")

                dict.setValue(event.startDate, forKey: "startDate")

                dict.setValue(event.endDate, forKey: "endDate")

                dict.setValue(calendar.title, forKey: "type")







Once all events are stored in “arrEvent”, we’ll reload the table for showing all the events.

//MARK: UITableViewDataSource


    func numberOfSectionsInTableView(tableView: UITableView) -> Int {

        return 1



    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {

        return arrEvent.count



    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

        let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)

        configureCell(cell, forRowAtIndexPath: indexPath)

        return cell



    func configureCell(cell: UITableViewCell, forRowAtIndexPath: NSIndexPath) {

        let dict = arrEvent.objectAtIndex(forRowAtIndexPath.row) as! NSDictionary


        let lblName = cell.contentView.viewWithTag(1) as! UILabel

        lblName.text = dict.valueForKey("title") as? String


        let lblType = cell.contentView.viewWithTag(2) as! UILabel

        lblType.text = dict.valueForKey("type") as? String


        let lblStartDate = cell.contentView.viewWithTag(3) as! UILabel

        lblStartDate.text = self.convertDateIntoString((dict.valueForKey("startDate") as? NSDate)!)


        let lblEndDate = cell.contentView.viewWithTag(4) as! UILabel

        lblEndDate.text = self.convertDateIntoString((dict.valueForKey("endDate") as? NSDate)!)



    func convertDateIntoString(dateString : NSDate) -> String {

        let dateFormatter = NSDateFormatter()

        dateFormatter.dateFormat = "yyyy-MM-dd hh:mm:ss +zzz"

        let dateObj = dateFormatter.stringFromDate(dateString)

        return dateObj


    //MARK: UITableViewDelegate


    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {



Now for adding an event in calendar set outlet of the text field for start date, end date, and event name.


Once user enters all three inputs, add events by calling following method on button tap event.

@IBAction func actionAddEvent(sender: AnyObject) {

        if txtStartDate.text == "" || txtEndDate.text == "" || txtEventName.text == "" {




        let dateFormatter = NSDateFormatter()

        dateFormatter.dateFormat = setDateFormat

        let dateStart = dateFormatter.dateFromString((txtStartDate.text)!)

        let dateEnd = dateFormatter.dateFromString((txtEndDate.text)!)


        let event:EKEvent = EKEvent(eventStore: eventStore)

        event.title = txtEventName.text!

        event.startDate = dateStart!

        event.endDate = dateEnd!

        event.notes = "This is a note"

        event.calendar = eventStore.defaultCalendarForNewEvents


        do {

            try eventStore.saveEvent(event, span: .ThisEvent)

            print("events added with dates:")


        } catch let e as NSError {




        print("Saved Event")




As you can see, working with Event Kit Framework is quite a simple process, nothing special is needed. And adding such calendar features in your iOS app can also increase the interaction in your mobile app.

However, if you face any problem or need technical assistance to implement this framework in your iOS app, Hire iPhone app developer from us.

Grab a free copy of calendar event reminder app demo from Github.

Author Bio
Hitesh Trivedi
Hitesh Trivedi
Designation: iOS Team Lead

Hitesh Trivedi is an iOS Team Lead at Space-O Technologies. He has over 10 years of experience in iOS app development. He has guided to develop over 100 iPhone apps with unique features and functionalities. He has special expertise in Swift and Objective-C.