sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

[ADD] new iOS 17 calendar and reminders permission handling including full access and write only authorization #321

Closed AF-cgi closed 1 year ago

AF-cgi commented 1 year ago

Goal

Referring to Issue-318 and PR-319: here is the solution to handle the new access levels for calendar and reminders under iOS 17 based on the existing code structure. This PR also takes into account the availability of iOS 17. I have updated the documentation too.

ostatnicky commented 1 year ago

To be honest, I like the solution in https://github.com/sparrowcode/PermissionsKit/pull/320 more. Because in this PR I feel to have two libraries CalendarFullAccessPermission and CalendarPermission is superfluous. They are about the same but different type only. https://github.com/sparrowcode/PermissionsKit/pull/320 makes it more compact.

ivanvorobei commented 1 year ago

Thanks for PR. I see 2 solution - one more library or extend init of calendar. Both are good, need check first which is more structed

AF-cgi commented 1 year ago

I did this approach for a better consistency with the rest of the code. Because there are also two libraries for the permissions of location. I prefer consistency over the whole code base. Otherwise it would be time for a refactoring.

ostatnicky commented 1 year ago

I did this approach for a better consistency with the rest of the code. Because there are also two libraries for the permissions of location. I prefer consistency over the whole code base. Otherwise it would be time for a refactoring.

Ah, I see. In that case you’re right!

ivanvorobei commented 1 year ago

I did this approach for a better consistency with the rest of the code. Because there are also two libraries for the permissions of location. I prefer consistency over the whole code base. Otherwise it would be time for a refactoring.

You exactly right but with location was mistake. I need redo it to one permission like calendar. But thanks for follow current struct, its really show you care about it.

For now PR closed because merged #320