Closed andrejguran closed 11 months ago
@andrejguran Does this actually really throw or is it more a deprecation warning?
Those two new methods just landed in iOS 17 beta, that would be weird for Apple to prevent old API usage and publish the replacements in the same version.
Usually, they let developers the time to migrate by supporting both for at least one major version.
@zoontek it's an error. Also they are deprecating EKAuthorizationStatus:authorized so the library will return incorrect status https://github.com/zoontek/react-native-permissions/blob/33472788eac2526276477afd077b50f3a0855371/ios/Calendars/RNPermissionHandlerCalendars.m#L24
It's possible that they will support both version, but I can't imagine how they'd support old authorized
and new fullAccess
and writeOnly
statuses at the same time. I am leaning towards the possibility that on 18th when iOS 17 is released it will stop working.
Fixed in first v4 alpha: https://github.com/zoontek/react-native-permissions/pull/808
Bug summary
In new iOS 17 (to be relased on 18th of Sept) this permission request: https://github.com/zoontek/react-native-permissions/blob/33472788eac2526276477afd077b50f3a0855371/ios/Calendars/RNPermissionHandlerCalendars.m#L31 is deprecated and throw error:
Error: -requestAccessToEntityType:completion: has been deprecated-calling this method is no longer allowed. Instead, use -requestFullAccessToEventsWithCompletion:, -requestWriteOnlyAccessToEventsWithCompletion:, or -requestFullAccessToRemindersWithCompletion:.
Deprication notice: https://developer.apple.com/documentation/eventkit/ekeventstore/1507547-requestaccesstoentitytype
Library version
3.9.0
Environment info
Steps to reproduce
request calendar permissions on iOS 17
Reproducible sample code