iOS EventKit - Event is not being deleted from calendar

前端 未结 2 1121
猫巷女王i
猫巷女王i 2021-01-15 06:14

I\'m deleting event using the following code

[store requestAccessToEntityType:EKEntityTypeEvent completion: ^(BOOL granted, NSError *error) {
    if (grante         


        
2条回答
  •  时光取名叫无心
    2021-01-15 06:49

    I was getting similar error on removing a calendar:

    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.)"

    As it is not exactly the same message I will just explain what helped me. The issue came from making "remove" operation on a new EventStore object. Try to make sure you hold a reference to EventStore and both adding and removing operations are called on the same object.

提交回复
热议问题