问题标签 [ekeventstore]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1830 浏览

ios - iOS EventKit - 事件未从日历中删除

我正在使用以下代码删除事件

我没有错误,eventDeleteError但控制台日志中出现以下消息

CADObjectGetInlineStringProperty获取 UUID 失败EKPersistentAttendee,出现错误Error Domain=EKCADErrorDomain Code=1010 "操作无法完成。(EKCADErrorDomain 错误 1010。)”

0 投票
1 回答
229 浏览

ios - EKCalendar 过去的活动

我试图从一个确定的 中获取所有事件EKCalendar,但是如果我eventsMatching Predicate:使用生成的谓词predicateForEventsWithStartDate:endDate:calendars:和过去的 ' startDate' 调用,我会得到一个空对象。这是一个错误?还是我无法找回过去的事件?

编辑(NSData 声明):

0 投票
1 回答
1145 浏览

ios7 - iOS7 Calendar - Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013

I am receiving the following error on the first run of my app in an iOS7 app that I am trying to integrate with an existing project and can not figure out how to eliminate this error.

"Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013"

The code that triggers the error on the first run of the app is:

Do I need to check if the eventStore (in the last function) is empty before using the predicate statement?

The functions definitions are below:

This function makes sure the user has granted permission to access calendar.

Function below is called when permission is granted.

The first line of the function calls fetchEvents function that contains the error causing statement.

This function executes the statement ([self.eventStore eventsMatchingPredicate:predicate]) that is causing the error on the first run of the app.

0 投票
2 回答
1956 浏览

ios - iOS - 删除 Recurring EKEvent,事件再次出现

我在日历中有一个经常性事件。我正在使用此代码删除一个事件[store removeEvent:event span:EKSpanThisEvent commit:YES error:&errorThis];,并且此方法返回true,但该事件并未从日历中删除。

0 投票
0 回答
6369 浏览

macos - 实施沙盒时出错:“拒绝文件读取元数据/库”

我意识到我在准备沙盒方面有点晚了,但事实就是如此。

我正在为 OS X 10.9 开发。该应用程序显示日历事件数据,但不允许编辑,因此我启用了日历功能。

当我从 Xcode 运行它时,该应用程序在启用沙盒的情况下运行良好,但是当我导出它使用开发人员 ID 签名时,该应用程序运行,但无法访问日历数据。更重要的是,系统从不要求我允许该应用访问日历数据。

当我运行该应用程序时,它会启动,但不显示任何数据。在 Console 中,sandboxd 会抛出一堆如下所示的错误:

sandboxd: ([54]) appleeventsd(54) deny file-read-metadata /Library

sandboxd: ([54]) appleeventsd(54) deny mach-lookup com.apple.ocspd

我用 来检查应用程序的权利codesign -d --entitlements,它确认它是沙盒并具有日历权利。但是,当我在应用程序中检查它是否具有访问权限[EKEventStore authorizationStatusForEntityType:EKEntityTypeEvent]时,毫不奇怪,它从未询问过它,它会返回EKAuthorizationStatusNotDetermined.

我觉得我在这里缺少一些关于权利、代码签名或部署的非常基本的东西,但我不知道它是什么。所以我投身于你们集体的仁慈和智慧。

0 投票
3 回答
616 浏览

ios - 保存 80 个 ekevents 后收到内存警告

成功添加事件后,它显示:

“收到内存警告。响应 SpringBoard 的终止而终止”

应用程序终止。这发生在 iOS 7 设备中。我还没有在 iOS 6 及更低版本中检查它。如果仅保存了几个事件(30 或更少),则代码可以正常工作,但它显示保存时 80 个或更多事件的内存问题。

0 投票
3 回答
883 浏览

ios - 在 ARC 中收到内存警告

我正在调用syncWithCalendar,成功添加事件后,我收到内存不足警告,应用程序因“收到内存不足”警告而终止。日历中生成和保存的事件超过 50 个。我尝试使用工具,但无法找到发生内存泄漏的代码,也无法通过工具中显示的实时字节找到导致泄漏。谁能帮我解决这个问题。

0 投票
2 回答
650 浏览

ios - EKEvent 获取当前事件 iOS7

所以我需要在日历中获取当前事件。IE - 一个已经开始但尚未结束的事件。我写了一些代码,但它不起作用。通过调试,我注意到我的 oneDayAgo 变量为零,我不明白为什么。oneWeekFromNow 变量很好。

这是我写的方法:

}

0 投票
1 回答
481 浏览

ios - 如果我从 EKReminder 子类化,我将能够将我的自定义类保存到 iCloud 上的事件存储区

我想开发一个自定义提醒应用程序。EKReminder 默认拥有的属性和方法是不够的。如果我对它进行子类化,然后添加我需要的所有额外属性和东西,我是否能够将它保存到 iCloud 提醒/日历事件存储中?

“正常”提醒应用程序是否能够“看到”我保存的自定义提醒并操作它可以看到的部分数据?

0 投票
1 回答
1924 浏览

ios - 为什么在 requestAccessToEntity:completion 中使用 performSegueWithIdentifier 时使用 dispatch_async?

当我在完成块中调用 performSegueWithIdentifier 时,如果我不将调用包装在 dispatch_async 中,则实际上需要 10 秒才能真正发生 segue。但是,我可以在不将它们包装在同一个 dispatch_async 中的情况下做其他事情,例如做核心数据工作,或者记录“事物”......

关于它是如何工作的以及为什么......我迷路了。如果这里不适合提出这样的问题,我深表歉意。