首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >EKEventStore eventWithIdentifier导致EKCADErrorDomain错误1010

EKEventStore eventWithIdentifier导致EKCADErrorDomain错误1010
EN

Stack Overflow用户
提问于 2014-10-30 02:55:15
回答 1查看 1.9K关注 0票数 1

创建日历事件对我来说很好,因为编辑已经存在的事件会导致问题。当我尝试为EKEventStore对象的一个实例使用eventWithIdentifier时,它记录了以下错误:

获取标识符为5E5EA399-1852-4A50-8155-CD5CDCE69317的事件时出错: Error Domain=EKCADErrorDomain Code=1010“该操作无法完成。(EKCADErrorDomain错误1010。)”

我一直在寻找这个错误的解释,但没有任何运气,谁有任何线索?下面是我认为的相关代码

代码语言:javascript
复制
    if (!_eventStore)
    {
        _eventStore = [[EKEventStore alloc] init];

    }

    if ([_eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) {
        // iOS 6 and later
        [_eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
            if (granted) {
                EKEvent *event = [_eventStore eventWithIdentifier:_calEventIdentifier];
                [self editCalendarEventWithOldEvent:event];

            }
        }];
    } else {
        EKEvent *event = [_eventStore eventWithIdentifier:_calEventIdentifier];
        [self editCalendarEventWithOldEvent:event];

    }
EN

回答 1

Stack Overflow用户

发布于 2015-08-25 02:45:33

EKEvent对象有多个标识符。在将EKCalendarItemcalendarItemIdentifier传递给eventWithIdentifier:时,我也得到了这个错误。

确保传递从EKEventeventIdentifier属性获得的值。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26638431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档