title: EventKit permission
body: <p>I would like my <code>EventKit</code> to request permission to the calendar when an event is attempted to be added to the calendar with access denied. It is only asking the first time the app is used and if you deny access in the settings it will not prompt the user to grant access again. Please help. </p>
  
  <p>Extra Credit: I would also like it to check if the event already exists in the calendar, and if so, edit it. Any help with this as well would be appreciated!!</p>
  
  <p>Here is my code: </p>
  
  <pre><code>func addToCalendar(){
      let eventStore = EKEventStore()
  
      let startDate = NSDate()
      let endDate = startDate.dateByAddingTimeInterval(60 * 60) // One hour
  
      if (EKEventStore.authorizationStatusForEntityType(.Event) != EKAuthorizationStatus.Authorized) {
          eventStore.requestAccessToEntityType(.Event, completion: {
              granted, error in
              self.createEvent(eventStore, title: "\(self.meal.text!)", startDate: startDate, endDate: endDate)
          })
      } else {
          createEvent(eventStore, title: "\(self.meal.text!)", startDate: startDate, endDate: endDate)
      }
  }
  
  func createEvent(eventStore: EKEventStore, title: String, startDate: NSDate, endDate: NSDate) {
      let event = EKEvent(eventStore: eventStore)
  
      event.title = title
      event.startDate = startDate
      event.endDate = endDate
      event.calendar = eventStore.defaultCalendarForNewEvents
      event.notes = "\(self.Recipe.text!) - See Meal Planning on Listacular"
  
      do {
          try eventStore.saveEvent(event, span: .ThisEvent)
          savedEventId = event.eventIdentifier
      } catch {
  
          print("Denied")
      }
  }
  </code></pre>