I want to insert an event in the system calendar, the code used is as follows:
NSError *error = nil;
if (NO == [store saveEvent:event
span:EKSpanThisEvent
commit:YES
error:&error]
||
error) {
IMOAssert(false);
}
The return value of each call is YES. But the final result is that in the system schedule, you can see the event I inserted. After 1 or 2 seconds, the event disappears automatically. Sometimes events will not disappear automatically, but if 2 or 3 events are inserted in the same time period, the event inserted first will also disappear, or even all events will not be displayed, and the set reminder will also become invalid.
Has anyone encountered similar problems? Any good suggestions? Thanks!