-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event in another store after editing? #1
Comments
Ok, I found that if I call reset() just before removeAllEvents() then it all works properly. Anyway, weird behavior. :) |
The error is because you are using two different calendar managers, i think. Tell me if this worked for you. |
Thanks for answer Albert. I'm using the same one. It's just a shortcut variable what works well in every other case. |
Check the new version I submitted. I added an option to save an event with span parameters, and now the EventStore is never recreated since the first time it's initialized |
Nothing changed, same error if I don't reset store manually before removeAll. I noticed that changing that EKRecurrenceEnd adds additional string to the event.eventIdentifier Before: it looks like updating recurrence end date make some troubles... |
Ok, the problem occurred only on Tests target, so don't worry. I can reset store there easily. In production code everything is fine. |
Great, so my last vesion helped, right? |
Hi, I love your calendar manager!
I had no issues until I'm trying to introduce events editing in my app.
When I create an event, everything is ok. Then when I change its recurrenceRules, it lands in another store or something, because later manager can't remove all events throwing error:
0 CoreFoundation 0x0000000104af5d4b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010455721e objc_exception_throw + 48 2 EventKit 0x00000001056a0c22 __30-[EKEventStore _deleteObject:]_block_invoke + 0 3 EventKit 0x0000000105656657 -[EKPersistentObject _removeObjectCore:fromValues:relation:] + 544 4 EventKit 0x000000010565693c -[EKPersistentObject primitiveRemoveRelatedObject:forKey:] + 180 5 EventKit 0x0000000105681698 -[EKPersistentCalendarItem removeDetachedItem:] + 265 6 EventKit 0x000000010568178f -[EKPersistentCalendarItem deleteSelfAndDetached] + 224 7 EventKit 0x0000000105668c2f -[EKEvent _deleteWithSpan:error:] + 786 8 EventKit 0x000000010566a3a2 -[EKEvent removeWithSpan:error:] + 509 9 EventKit 0x000000010568f3da -[EKEventStore removeEvent:span:commit:error:] + 299 10 AMGCalendarManager 0x0000000101d3e3e9 _TFC18AMGCalendarManager18AMGCalendarManagerP33_72EF97C106556493E498DAB06AB2172B11deleteEventfT5eventCSo7EKEvent6commitSb_Sb + 153 11 AMGCalendarManager 0x0000000101d3c16f _TFFFC18AMGCalendarManager18AMGCalendarManager15removeAllEventsFT10completionGSqFGSqCSo7NSError_T___T_U_FSbT_U_FTGSqS1__GSqGSaCSo7EKEvent___T_ + 463 12 AMGCalendarManager 0x0000000101d3c2e3 _TTRXFo_oGSqCSo7NSError_oGSqGSaCSo7EKEvent____XFo_iTGSqS__GSqGSaS0_____iT__ + 35 13 AMGCalendarManager 0x0000000101d3f301 _TPA__TTRXFo_oGSqCSo7NSError_oGSqGSaCSo7EKEvent____XFo_iTGSqS__GSqGSaS0_____iT__ + 81 14 AMGCalendarManager 0x0000000101d3c9a3 _TFFC18AMGCalendarManager18AMGCalendarManager12getAllEventsFT10completionGSqFTGSqCSo7NSError_GSqGSaCSo7EKEvent___T___T_U_FSbT_ + 1411 15 AMGCalendarManager 0x0000000101d39ca9 _TFC18AMGCalendarManager18AMGCalendarManager20requestAuthorizationfT10completionFSbT__T_ + 393 16 AMGCalendarManager 0x0000000101d3c3f6 _TFC18AMGCalendarManager18AMGCalendarManager12getAllEventsfT10completionGSqFTGSqCSo7NSError_GSqGSaCSo7EKEvent___T___T_ + 262 17 AMGCalendarManager 0x0000000101d3bf57 _TFFC18AMGCalendarManager18AMGCalendarManager15removeAllEventsFT10completionGSqFGSqCSo7NSError_T___T_U_FSbT_ + 423 18 AMGCalendarManager 0x0000000101d39ca9 _TFC18AMGCalendarManager18AMGCalendarManager20requestAuthorizationfT10completionFSbT__T_ + 393 19 AMGCalendarManager 0x0000000101d3bd66 _TFC18AMGCalendarManager18AMGCalendarManager15removeAllEventsfT10completionGSqFGSqCSo7NSError_T___T_ + 262
This is my code
AMGCalendarManager.shared.removeAllEvents()
The text was updated successfully, but these errors were encountered: