小编wht*_*man的帖子

使用calendarWithIdentifier的EKCADErrorDomain

在我的iOS应用程序中,我曾使用以下方法访问日历:

EKCalendar* cal = [eventStore calendarWithIdentifier:[calendarIDs objectAtIndex:i]];
Run Code Online (Sandbox Code Playgroud)

通过以下方式向用户询问权限:

eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted,NSError* error){}
Run Code Online (Sandbox Code Playgroud)

现在这在iOS 7上工作正常,但在iOS 8上,每次调用方法calendarWithIdentfier时我都会遇到以下错误:

Error getting shared calendar invitations for entity types 3 from daemon: 
Error Domain=EKCADErrorDomain Code=1013 
"The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"
Run Code Online (Sandbox Code Playgroud)

我可以写\读日历没有问题,但我不明白为什么会引发这个异常.我已经尝试了一些这里提出的方法,但在这种情况下它们似乎都没有.

iphone ios ekeventstore ios8

12
推荐指数
1
解决办法
4740
查看次数

标签 统计

ekeventstore ×1

ios ×1

ios8 ×1

iphone ×1