iOS EventKit - 事件未从日历中删除
<p><p>我正在使用以下代码删除事件</p>
<pre><code>[store requestAccessToEntityType:EKEntityTypeEvent completion: ^(BOOL granted, NSError *error) {
if (granted) {
EKEvent *event = ;
NSError *eventDeleteError = nil;
if (event) {
;
}
if (eventDeleteError) {
NSLog(@"Event Deletion Error: %@", eventDeleteError);
}
}];
</code></pre>
<p><code>eventDeleteError</code> 中没有错误,但控制台日志中出现以下消息</p>
<blockquote>
<p><code>CADObjectGetInlineStringProperty</code> failed fetching UUID for <code>EKPersistentAttendee</code> with error <code>Error Domain=EKCADErrorDomain Code=1010 "</code>The operation couldn’t be completed. (EKCADErrorDomain error 1010.)"</p>
</blockquote></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我在删除日历时遇到了类似的错误:</p>
<blockquote>
<p>CADObjectGetIntProperty failed with error Error Domain=EKCADErrorDomain Code=1010 "The operation couldn’t be completed. (EKCADErrorDomain error 1010.)"
CADObjectGetRelation failed with error Error Domain=EKCADErrorDomain Code=1010 "The operation couldn’t be completed. (EKCADErrorDomain error 1010.)"</p>
</blockquote>
<p>由于这不是完全相同的消息,我将仅解释对我有帮助的原因。
问题来自对新的 EventStore 对象进行“删除”操作。尝试确保您持有对 EventStore 的引用,并且添加和删除操作都在同一个对象上调用。</p></p>
<p style="font-size: 20px;">关于iOS EventKit - 事件未从日历中删除,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/20215343/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/20215343/
</a>
</p>
页:
[1]