Skip to content

Fix first-launch iOS calendar permission refresh - #3724

Draft
aisraelov wants to merge 1 commit into
devfrom
aisraelov/fix-call-calendar-access
Draft

Fix first-launch iOS calendar permission refresh#3724
aisraelov wants to merge 1 commit into
devfrom
aisraelov/fix-call-calendar-access

Conversation

@aisraelov

@aisraelov aisraelov commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • request and verify iOS calendar access through expo-calendar, the same EventKit bridge used to read events
  • avoid rejecting a newly granted full-access permission because another native permission bridge has not refreshed yet
  • add a regression test covering the first-session grant path

Bug

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_01M0EG1EDST6G3STS46FSTSVF1

Test plan

  • bun run test --runInBand src/utils/PermissionsUtils.test.ts
  • bun run compile
  • bun x prettier --check src/utils/PermissionsUtils.tsx src/utils/PermissionsUtils.test.ts
  • bun 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-permissions and cross‑checked expo-calendar, which could race and report “no access” on first app session. Now: we check and request only through expo-calendar and trust its returned grant.

  • iOS CALENDARS: skip react-native-permissions.request; pre-check with ExpoCalendar.getCalendarPermissionsAsync, prompt with ExpoCalendar.requestCalendarPermissionsAsync, and handle “denied and can’t ask again” via the existing denied flow. On grant, mark the stored PERMISSION_GRANTED_calendar flag.
  • Other permissions and Android paths are unchanged.
  • Adds a regression test ensuring we don’t call react-native-permissions.request for calendar and that we persist the grant.

Written for commit 422e429. Summary will update on new commits.

Review in cubic

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

📋 PR Review Helper

📱 Mobile App Build

Ready to test! (commit 422e429)

📥 Download APK

🕶️ ASG Client Build

Waiting for build...


🔀 Test Locally

gh pr checkout 3724

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant