2

I create a EKEventStore, make sure I have access, create an event and persist it. I save off the eventIdentifier and all is good. It's a recurring calendar entry.

Next I want to remove a couple days from the recurring event. You might have a recurring meeting every Friday, but this Friday is the annual dingleberry festival and so the meeting is cancelled.

I use removeEvent:span:commit:error: and all works as intended.

Then I decide I want to ditch the event from the calendar completely. I call [self.store removeEvent:event span:EKSpanFutureEvents commit:YES error:&error]; and I throw some errors/garbage into the console.

Error loading date date from daemon: Error Domain=EKCADErrorDomain Code=1010 "The operation couldn’t be completed. (EKCADErrorDomain error 1010.)"

This only happens when I remove specific dates over the span of a recurring event and the EKEventStore spews this line once for every single missing date in the event. The result is, if I cancel a half dozen events with a half dozen days taken out in the middle I get quite a large spew of these message.

It doesn't seem to impact the functionality of my code or even the performance, but I hate seeing stuff like this spew into the console so I'm hoping someone can help me find a reasonable way to prevent it.

DBD
  • 23,075
  • 12
  • 60
  • 84
  • possible duplicate of [iOS EventKit - Event is not being deleted from calendar](http://stackoverflow.com/questions/20215343/ios-eventkit-event-is-not-being-deleted-from-calendar) – memmons Sep 16 '14 at 15:25
  • Read that one. Answered that one. Different issue... you'll notice mine deletes fine. – DBD Sep 16 '14 at 15:33
  • Ah, gotcha. Close withdrawn. – memmons Sep 17 '14 at 16:49

1 Answers1

0

This from IOS Developer Library SimpleEKDemo , in the readMe file. It says there is a known bug.

What I did was to put this in a try catch block and ro keep trying and the record eventually gets deleted. Ugly !!!

This may be similar to your error

https://developer.apple.com/library/ios/samplecode/SimpleEKDemo/Listings/ReadMe_txt.html

1.1 - Updated for iOS 6.0. Now uses ARC and storyboard. Shows how to check and request access to a user’s Calendar database. You may encounter a CADObjectGetRelatedObjects failed with error Error Domain=NSMachErrorDomain Code=268435459 "The operation couldn’t be completed. (Mach error 268435459 - (ipc/send) invalid destination port)" message when deleting an event. This is a known bug that does not affect running this sample.

Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119