gpt4 book ai didi

ios - 事件(带有标识符 :) fails after application restart

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:04:59 24 4
gpt4 key购买 nike

我正在使用 EventKit 创建和删除日历 (EKEvent) 事件。

我的代码非常基础,创建一个 EKEventStore() 并使用保存添加一个新事件 (EKEvent)。稍后在某些特定情况下,使用 event(withIdentifier:) 从 eventStore 中获取事件并删除。

在应用重新启动之前一切正常。

当尝试获取在应用程序之前运行时保存的事件时,获取返回 nil,但有异常:

2018-01-26 20:26:30.532019+0200 MyApplication[1029:329807] [EventKit] Error getting event with identifier 174799E7-BD04-48B6-8B54-60AC28F4224C:FF38551F-EA72-4718-8DAD-827E48078E63: Error Domain=EKCADErrorDomain Code=1010 "(null)"

保存事件行:

eventStore.save(event, span: .futureEvents, commit: true)

获取事件行:

let event = eventStore.event(withIdentifier: eventIdentifer)

有什么想法吗?

最佳答案

请忽略此问题,问题已解决。

关于ios - 事件(带有标识符 :) fails after application restart,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48471135/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com