Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-calendar] [iOS] Fix unnecessary permission check for calendars when calling saveCalendarAsync with entityType "reminder" #24967

Merged
merged 2 commits into from
Oct 21, 2023

Conversation

robertying
Copy link
Contributor

Why

saveCalendarAsync in Expo Calendar checks the permission for calendars even if the passed entity is of type Reminders; it also doesn't check for reminders permissions in this case.

How

Check respective permissions based on entityType in the calendar details payload.

Test Plan

  1. With an app set with no calendar permission and only reminders permission, we can't create a reminder list in the Reminders app, getting the error of missing calendar permission.
  2. Apply the fix.
  3. Now if we are only creating a reminder list without any calendar permission, it can go through without an issue.

Checklist

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Oct 20, 2023
@robertying robertying marked this pull request as ready for review October 20, 2023 18:38
Copy link
Collaborator

@alanjhughes alanjhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alanjhughes alanjhughes merged commit 2a05f9d into expo:main Oct 21, 2023
6 of 8 checks passed
@robertying robertying deleted the fix-incorrect-permission-check branch October 21, 2023 12:05
marklawlor pushed a commit that referenced this pull request Oct 30, 2023
…when calling `saveCalendarAsync` with `entityType` `"reminder"` (#24967)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants