We don't need to add -- latest functions for iOS-17 as it introduces requestFullAccessToEvents.
if #available(iOS 17.0, *) {
eventStore.requestFullAccessToEvents(completion: { (granted: Bool, _: Error?) -> Void in
completion(granted)
})
} else {
// Fallback on earlier versions
eventStore.requestAccess(to: .event, completion: { (granted: Bool, _: Error?) -> Void in
completion(granted)
})
}
Solution for iOS 17 Calendar request authorization is to add two keys in Info.plist file including previous key i.e. NSCalendarsUsageDescription
<string>We need this permission in order to set reminders for you</string>
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
<string>We need this permission in order to set reminders for you</string>