从最近添加的事件中获取标识符(EKEventStore saveEvent)

发布于 2024-11-11 15:20:02 字数 170 浏览 6 评论 0原文

我正在使用 EKEventStore saveEvent 将自定义事件保存到日历中,返回值为布尔值,因此我可以在存储过程失败时进行处理。是否有机会轻松找到此事件的唯一标识符,以便我可以随后使用 eventWithIdentifier 获取它?我不想按日期进行选择,因为它可能会返回多个结果。还有其他可能性来获取“我的”事件吗?

I am saving a custom Event with EKEventStore saveEvent to the calendar the return value is boolean so I can handle if the storage process fails. Is there any chance to easily find out the unique identifier for this event, so I can fetch it afterwards with eventWithIdentifier? I don't want to make a selection by date cause it could return more then one result. Is there any other posibility to fetch "my" event?

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

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

发布评论

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

评论(1

踏月而来 2024-11-18 15:20:02
(NSString *) uniqueIdentifier = myEvent.eventIdentifier;

就是这样。

(NSString *) uniqueIdentifier = myEvent.eventIdentifier;

That's it.

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