EventKit 谓词选择

发布于 2024-12-02 08:24:09 字数 517 浏览 4 评论 0原文

我正在开发的应用程序会将事件写入用户手机上的日历。我正在考虑在我的应用程序事件之前添加像 myapp: 这样的前缀,这样我就可以在事件存储中找到我的事件以显示在表格视图中。

然而,当我查看 ios eventkit 框架。我读得对吗?

我应该只为手机上的应用程序创建一个日历,还是除了日期之外还有其他方法来识别我的事件?

提前致谢。

The app I'm developing will write events to a calendar on the user's phone. I was thinking of preceeding my app's event with a prefix like myapp: so I can find my events in the event store to display in a tableview.

However, it seems that the only predicate available is based upon a start and end date (– predicateForEventsWithStartDate:endDate:calendars:) when I review the ios eventkit framework. Am I reading that right?

Should I just then create a calendar for just my app on the phone or is there another way to identify my events beside dates?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独守阴晴ぅ圆缺 2024-12-09 08:24:09

另一种选择是使用本地存储(sqlite、coredata 等)来索引事件。每个事件都有事件 ID,您可以通过 eventWithIdentifier 从存储中检索事件。

不确定您的数据访问模式是什么,但这也允许您在应用程序中快速存储数据,以便您可以有效地查询(使用强大的谓词和 SQL 语法)。您的本地结果可能只返回 eventId,并在表视图回调中获取该行的 id 并从事件存储中检索。

只是另一种选择...

One other option would be to have local storage (sqlite, coredata etc...) which indexes into the event. Each event has as event id and you can you retrieve the event from the store via eventWithIdentifier.

Not sure what your data access patterns are but that also allows you to quickly store data within your app that you can query effieciently (with a powerful predicates and sql syntax). Your local results could just return eventIds and in the the table view call backs you get the id for that row and retrieve from the events store.

Just another option ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文