TN3132: Changes to EventKit and EventKitUI in iOS 16
Test your apps against EventKit and EventKitUI API changes in iOS 16.
Overview
The iOS 16 SDK introduces some changes to the EventKit and EventKitUI frameworks. This document highlights some of the major changes. To learn about related changes in macOS Ventura 13, see TN3130: Changes to EventKit in macOS Ventura 13.
For apps running on systems prior to iOS 16, built with Xcode 13 or earlier and linked against older versions of the iOS SDK, the legacy behavior remains in place when using these frameworks. When you run your app on iOS 16, and have built it with Xcode 14 and linked against the iOS 16 SDK, you may see behavior that you are unfamiliar with when using EventKit or EventKitUI. To identify these changes in behavior, thoroughly test your app on each major OS version it supports on real hardware. Confirm that your implementation of EventKit or EventKitUI behaves as you expect in each OS version and update your code where needed. If you notice an unexpected behavior in EventKit, report it using Feedback Assistant.
EKCalendarChooser
Setting the selectedCalendars property of a calendar chooser view controller no longer calls the calendarChooserSelectionDidChange(_:) delegate method. calendarChooserSelectionDidChange(_:) is only called when the user selects a calendar in the view controller.
EKEventStore
Committing changes
When you call saveCalendar(_:commit:), removeCalendar(_:commit:), save(_:span:commit:), remove(_:span:commit:), save(_:commit:), or remove(_:commit:) methods with the commit parameter set to true, EKEventStore attempts to immediately save and commit your changes to the event store. If the commit fails, EKEventStore automatically rolls back all changes that have been saved but aren’t yet committed to the event store.
In the legacy behavior, objects remain saved but uncommitted in the event store when the commit failed.
Fetching events
events(matching:) and enumerateEvents(matching:using:) now return events that have been saved but weren’t yet committed to the event store.
In the legacy behavior, events(matching:) and enumerateEvents(matching:using:) only return events that have been saved and committed to the event store.
Recurring events
If you are saving a detached occurrence of a recurring event, and you specify EKSpan.futureEvents for the span parameter of the save(_:span:commit:) method, your changes apply to all future occurrences of the event.
In the legacy behavior, your changes only apply to this instance of the recurring event.
Revision History
2022-08-16 First published.
See Also
Latest
TN3205: Low-latency communication with RDMA over ThunderboltTN3206: Updating Apple Pay certificatesTN3179: Understanding local network privacyTN3190: USB audio device design considerationsTN3194: Handling account deletions and revoking tokens for Sign in with AppleTN3193: Managing the on-device foundation model’s context windowTN3115: Bluetooth State Restoration app relaunch rulesTN3192: Migrating your iPad app from the deprecated UIRequiresFullScreen keyTN3151: Choosing the right networking APITN3111: iOS Wi-Fi API overviewTN3191: IMAP extensions supported by Mail for iOS, iPadOS, and visionOSTN3134: Network Extension provider deploymentTN3189: Managing Mail background traffic loadTN3187: Migrating to the UIKit scene-based life cycleTN3188: Troubleshooting In-App Purchases availability in the App Store