Fix first-launch iOS calendar permission refresh - #3724
Draft
aisraelov wants to merge 1 commit into
Draft
Conversation
Contributor
📋 PR Review Helper📱 Mobile App Build✅ Ready to test! (commit 🕶️ ASG Client Build⏳ Waiting for build... 🔀 Test Locallygh pr checkout 3724 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
expo-calendar, the same EventKit bridge used to read eventsBug
On the first launch of Mentra Call, granting full calendar access could still produce a no-calendar-access error. Restarting the Mentra App made the same grant work.
Report:
rep_01M0EG1EDST6G3STS46FSTSVF1Test plan
bun run test --runInBand src/utils/PermissionsUtils.test.tsbun run compilebun x prettier --check src/utils/PermissionsUtils.tsx src/utils/PermissionsUtils.test.tsbun x eslint src/utils/PermissionsUtils.tsx src/utils/PermissionsUtils.test.ts(0 errors; existing warnings only)Summary by cubic
Fixes first‑launch iOS calendar permission refresh so a newly granted full calendar access is respected immediately. Before: we requested via
react-native-permissionsand cross‑checkedexpo-calendar, which could race and report “no access” on first app session. Now: we check and request only throughexpo-calendarand trust its returned grant.react-native-permissions.request; pre-check withExpoCalendar.getCalendarPermissionsAsync, prompt withExpoCalendar.requestCalendarPermissionsAsync, and handle “denied and can’t ask again” via the existing denied flow. On grant, mark the storedPERMISSION_GRANTED_calendarflag.react-native-permissions.requestfor calendar and that we persist the grant.Written for commit 422e429. Summary will update on new commits.