user2298590
user2298590

Reputation:

ios 6.1.3 : No calendar has been set

I am trying to save an event on a device running ios 6.1.3 however I keep getting the error 'No calendar has been set'.

I have used the requestAccessToEntity:completion: to gey user permission however the EventStore still gives error even after user allows access.

The application runs on the simulator and on devices running ios 6.0.

Upvotes: 1

Views: 517

Answers (1)

Maurizio
Maurizio

Reputation: 4169

I've seen the same problem on 6.1.3 and 6.1.4.

If you're trying to create the event in the completion block of requestAccessToEntity:completion:, you can't create the event in that block if you also create the EKCalendar.

Steps:

  1. Call requestAccessToEntity:completion:
  2. If successful, create new EKCalendar inside completion block
  3. Outside of the completion block, create your new EKEvent using your new EKCalendar and add it

Upvotes: 1

Related Questions