PermissionsKit: New iOS 17 requestFullAccessToEvents returns always notDetermined on first run
New iOS 17 requestFullAccessToEvents returns always notDetermined on first run of an app.
@ivanvorobei @alexanderpuchta is it working to you?
We need a fix there https://github.com/sparrowcode/PermissionsKit/pull/325 but we need to have a return value in func request(completion: @escaping () -> Void) because requestFullAccessToEvents returns accessGranted = true but status or EKEventStore.authorizationStatus(for: EKEntityType.event) returns .notDetermined until you run your app again.
So this library still doesn’t work well on iOS 17.
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 15 (15 by maintainers)
Yes, it looks really promising! Thanks for the effort, Alex.
@ivanvorobei @ostatnicky to fix the issue with initial result is always
.notDeterminedwe could add an@available(iOS 17.0, *) func request() async -> Statusto classPermission.this could look like this:
this could then be used within apps like:
let status = await Permission.calendar(access: .full).request()helper methods for
EKEventStorecan clean up code, so you don’t have to write thoserequestFullAccessorrequestWriteOnlyAccessagain and again.the default
request(completion: @escpaing () ->Void))could then be refactored like this: