iOS unable to update calendar event when synced to exchange account
<p>i'm having an issue updating a calendar event on my ipad with an exchange email account on it.  it'll create new events no problem, but on an update, it'll create another one, instead of updating the existing.  a few things</p>

<ul>
<li>code below works for any other type of email account (say gmail)</li>
<li>code below works if i don't have an email (so it just writes to the local calendar)</li>
<li>yes i've checked that my exchange email has calendars enabled</li>
</ul>

<p>the error being thrown is: </p>

<pre><code>Error getting event with identifier 9E678016-F8E4-46B1-9043-E54E09A148F0:5A89FFAF15B1408386A9CBD518BBDD770: Error Domain=EKCADErrorDomain Code=1010
</code></pre>

<p>here is the code that i'm using.</p>

<pre><code> [self.eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
    if (granted) {
        dispatch_sync(dispatch_get_main_queue(), ^{
            NSString *appleEventId = [item valueForKey:@"appleEventId"];
            EKEvent *currentEvent = [self.eventStore eventWithIdentifier:[item valueForKey:@"appleEventId"]];
            if (currentEvent){
                NSLog(@"LOG101: found an event with %@",appleEventId );
                [self createEvent:currentEvent inEventStore:self.eventStore forActivity:item];
            }
            else{
                NSLog(@"LOG101: COULD NOT FIND an event with %@",appleEventId );
                EKEvent *event = [EKEvent eventWithEventStore:self.eventStore];
                [self createEvent:event inEventStore:self.eventStore forActivity:item];
            }
            completionHandler(YES);
        });
    }
    else{
        dispatch_sync(dispatch_get_main_queue(), ^{
        completionHandler(NO);
        });
    }
}];
</code></pre>

<p>(create event does a bunch of customer logic, but ultimately calls the following to create an event)</p>

<pre><code>  [eventStore saveEvent:event span:EKSpanThisEvent error:&amp;err];
</code></pre>

<p>it's frustrating because the code works for everything else but exchange. any tips / suggestions would be great. thanks</p>