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

Unable to get Reminders lists without CALENDAR permission #7808

Closed
hkaju opened this issue Apr 11, 2020 · 3 comments · Fixed by #7928
Closed

Unable to get Reminders lists without CALENDAR permission #7808

hkaju opened this issue Apr 11, 2020 · 3 comments · Fixed by #7928

Comments

@hkaju
Copy link

hkaju commented Apr 11, 2020

🐛 Bug Report

Environment

  Expo CLI 3.17.18 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 13.8.0 - /usr/local/bin/node
      Yarn: 1.22.0 - /usr/local/bin/yarn
      npm: 6.13.7 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Xcode: 11.4/11E146 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~36.0.0 => 36.0.2 
      react: ~16.9.0 => 16.9.0 
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 
    npmGlobalPackages:
      expo-cli: 3.17.18

Steps to Reproduce

Call Calendar.getCalendarsAsync(Calendar.EntityTypes.REMINDER) with Permissions.REMINDERS having been granted but without Permissions.CALENDAR on iOS.

Expected Behavior

Should be able to retrieve Reminders lists with only Permissions.REMINDERS.

Actual Behavior

[Unhandled promise rejection: Error: CALENDAR permission is required to do this operation.]

Reproducible Demo

https://snack.expo.io/EZmpfVyTBV

@cruzach
Copy link
Contributor

cruzach commented Apr 14, 2020

It seems like from the native iOS documentation that you need both CALENDAR and REMINDERS permission - https://developer.apple.com/documentation/eventkit/creating_events_and_reminders?language=objc

@cruzach cruzach added Calendar needs more info To be used when awaiting reporter response and removed Needs triage labels Apr 14, 2020
@hkaju
Copy link
Author

hkaju commented Apr 14, 2020

From what I gather, all of the EventKit documentation seems to imply that you can access entity types separately + there are apps out there that are able to operate with Reminders without having calendar permissions (e.g. https://twitter.com/smartgroceryapp).

I think the issue might be that the getCalendarsAsync method takes in an entity type but always checks for calendar permissions regardless of the entity type requested (see

if (![self _checkCalendarPermissions:reject]) {
).

@cruzach
Copy link
Contributor

cruzach commented Apr 14, 2020

Ah okay, thanks for the extra info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants