The below is a simple code to present EKCalendarChooser. I have tried subclassing as well both the approaches work in iOS 13 and below and crashes in iOS 14 only -
Code Block let store = EKEventStore() store.requestAccess(to: .reminder) { success, error in DispatchQueue.main.async { let chooser = EKCalendarChooser(selectionStyle: .multiple, displayStyle: .allCalendars, entityType: .reminder, eventStore: store) self.present(chooser, animated: true, completion: nil) } }
The below is the crash report for the same in iOS 14 -
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<EKFrozenReminderCalendar 0x600003724960> valueForUndefinedKey:]: this class is not key value coding-compliant for the key publishURL.'
(
0 CoreFoundation 0x000000010d35a4b2 _exceptionPreprocess + 242
1 libobjc.A.dylib 0x000000010b3cd26e objcexceptionthrow + 48
2 CoreFoundation 0x000000010d35a153 -[NSException init] + 0
3 Foundation 0x000000010aebfad8 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 225
4 Foundation 0x000000010aebe86e -[NSObject(NSKeyValueCoding) valueForKey:] + 317
5 EventKit 0x000000010b4d6042 -[EKObject(Shared) singleChangedValueForKey:] + 457
6 EventKit 0x000000010b4e4e84 -[EKCalendar publishURL] + 44
7 EventKitUI 0x000000010b707e4b -[EKCalendarInfo isPublished] + 23
8 EventKitUI 0x000000010b829ee7 -[EKCalendarChooser tableView:cellForRowAtIndexPath:] + 1342
9 UIKitCore 0x000000011f5b1e6a -[UITableView createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 866
10 UIKitCore 0x000000011f57b80c -[UITableView updateVisibleCellsNow:] + 2971
11 UIKitCore 0x000000011f59b52b -[UITableView layoutSubviews] + 194
12 UIKitCore 0x000000011f8d6269 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2465
13 QuartzCore 0x000000011a225357 -[CALayer layoutSublayers] + 258
14 QuartzCore 0x000000011a22b809 ZN2CA5Layer16layoutifneededEPNS11TransactionE + 575
15 UIKitCore 0x000000011f8c1c39 -[UIView(Hierarchy) layoutBelowIfNeeded] + 573
16 UIKitCore 0x000000011eb54703 -[UISheetPresentationController sheetLayoutInfoLayout:] + 48
17 UIKitCore 0x000000011eb51850 -[UISheetLayoutInfo layout] + 360
18 UIKitCore 0x000000011eb56580 54-[UISheetPresentationController transitionWillBegin:]blockinvoke2 + 52
19 UIKitCore 0x000000011f8c90c9 +[UIView(Animation) performWithoutAnimation:] + 84
20 UIKitCore 0x000000011eb564bd 54-[UISheetPresentationController transitionWillBegin:]blockinvoke.358 + 120
21 UIKitCore 0x000000011ec8fc82 -[UIViewControllerTransitionCoordinator applyBlocks:releaseBlocks:] + 294
22 UIKitCore 0x000000011ec8c13d -[UIViewControllerTransitionContext runAlongsideAnimations] + 263
23 UIKitCore 0x000000011f8c8ef2 63+[UIView(Animation) setAlongsideAnimations:toRunByEndOfBlock:]blockinvoke + 16
24 UIKitCore 0x000000011f89aa94 -[UIViewAnimationState _runAlongsideAnimations] + 24
25 UIKitCore 0x000000011f899897 -[UIViewAnimationState pop] + 37
Also, the crash happens only when entityType is reminder. It works fine for event.
Can someone please help me with any workaround for this, since calendar selection is the main feature within our app.