Hi !
We are using EventKit in our app and we let the user pick which calendar(s) to use to choose their event using EKCalendar Chooser. However, if the user presses on a calendar's edit button ( (i) button ) and decide to delete the calendar, our app crashes. It seems like EKCalendarChooser has an issue presenting an alert. It doesn't happen in iOS14 as the calendar editing button does not exist anymore.
We are embeding the view controller in a navigation controller before presenting it.
Is there something we can do to prevent the crash from happening?
Thank you !
We are using EventKit in our app and we let the user pick which calendar(s) to use to choose their event using EKCalendar Chooser. However, if the user presses on a calendar's edit button ( (i) button ) and decide to delete the calendar, our app crashes. It seems like EKCalendarChooser has an issue presenting an alert. It doesn't happen in iOS14 as the calendar editing button does not exist anymore.
Code Block Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x10d1d9a00>) of style UIAlertControllerStyleActionSheet from UINavigationController (<UINavigationController: 0x10da6f400>). The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
We are embeding the view controller in a navigation controller before presenting it.
Code Block let vc = EKCalendarChooser(selectionStyle: .multiple, displayStyle: .allCalendars, entityType: .event, eventStore: self.eventManager.eventStore) vc.selectedCalendars = Set<EKCalendar>() vc.delegate = self let nvc = UINavigationController(rootViewController: vc) self.present(nvc, animated: true, completion: nil)
Is there something we can do to prevent the crash from happening?
Thank you !