Reputation: 578
EventKit showing error when you fetch data for the first time.
[EventKit] Error getting all calendars: Error Domain=EKCADErrorDomain Code=1019 "(null)" 2018-01-17 19:19:22.190518+0530 StickyNoteApp[426:40382] [EventKit] Error getting default calendar for new events: Error Domain=EKCADErrorDomain Code=1019 "(null)" 2018-01-17 19:19:22.190556+0530 StickyNoteApp[426:40382] [EventKit] No object ID provided. Will not find out if the object exists. view will appear
[EventKit] Error (1019) in reply block for CADDatabaseFetchCalendarItemsWithPredicate attempt 1/3 2018-01-17 19:24:54.942170+0530 StickyNoteApp[426:40382] [EventKit] Error (1019) in reply block for CADDatabaseFetchCalendarItemsWithPredicate attempt 2/3 2018-01-17 19:24:54.942572+0530 StickyNoteApp[426:40382] [EventKit] Error (1019) in reply block for CADDatabaseFetchCalendarItemsWithPredicate attempt 3/3 2018-01-17 19:24:54.942588+0530 StickyNoteApp[426:40382] [EventKit] All retries exhausted for CADDatabaseFetchCalendarItemsWithPredicate 2018-01-17 19:19:22.242094+0530
Upvotes: 3
Views: 1897
Reputation: 3404
It's bug may be!
Anyways, I've got it solved. Need to create new instance of EventStore
after granting access as:
self.eventStore = EKEventStore()
eventStore.requestAccess(to: .event) { (granted, error) in
self.eventStore = EKEventStore()//<---------here's trick
//do stuff
}
Thanks to this answer!
Upvotes: 10