Conversation
# Why The `expo-calendar` package exposes some iOS-only APIs below without any platform annotation in the TypeScript type definitions. This means **users on Android may attempt to use these APIs and receive runtime errors or `undefined` behavior with no prior warning from the docs or type system.** - Reminders-related methods - `src/ExpoCalendar.types.ts`: `listReminders()` / `createReminder()` - `src/Calendar.ts`: `ExpoCalendarReminder` class - `src/Calendar.ts`: `getRemindersPermissions` / `requestRemindersPermissions` / `useRemindersPermissions` - `src/ExpoCalendar.types.ts`: `AddEventWithFormOptions.url` - `src/Calendar.ts`: `getDefaultCalendarSync()`, `getSourcesSync()` This PR fixes the documentation gap above and **removes the iOS-only doc for `getOccurrenceSync`**, which already has an Android function. # How Added `@platform ios` JSDoc annotations to all iOS-exclusive APIs. - **`ExpoCalendarReminder` class** — iOS Reminders app has no Android equivalent; annotated the entire class with `/** @platform ios */`. - **`ExpoCalendar.listReminders()`** and **`ExpoCalendar.createReminder()`** — methods that operate on iOS Reminders; added `@platform ios` to each. - **`requestRemindersPermissions`**, **`getRemindersPermissions`**, and **`useRemindersPermissions`** — the Reminders permission concept does not exist on Android; added `@platform ios` to each export. - **`AddEventWithFormOptions.url`** — Android's `CalendarContract` does not have a standard Web URL field (`CUSTOM_APP_URI` serves a different purpose); added `@platform ios` to the field (note: `ExpoCalendarEvent.url` already had the annotation). Additionally, `UnavailabilityError` is now thrown at runtime when iOS-only APIs are called on Android, consistent with the pattern used throughout this package. Affected APIs: - `ExpoCalendar.listReminders()` - `ExpoCalendar.createReminder()` - `ExpoCalendarReminder.get()` - `ExpoCalendarReminder.update()` - `ExpoCalendarReminder.delete()` - `requestRemindersPermissions()` - `getRemindersPermissions()` - `useRemindersPermissions()`. # Test Plan 1. Ran the package linter to ensure no type or style regressions: ``` npx expo-module lint ``` Exited with code `0` — no errors. 2. Ran the TypeScript compiler to ensure no type errors: ``` npx tsc --noEmit ``` Exited with code `0` — no errors. # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) --------- Co-authored-by: Wiktor Smaga <wiktor.smaga13@gmail.com>
…gration (#46854) # Why The legacy media library was designed before Android Scoped Storage was introduced, so there's no way to get a `content://` URI using the legacy API. This makes migration to the new API harder for apps that store old IDs in a database. Related conversation: #46512 # How - Adds `getAssetContentUriAsync` to the legacy API - Adds a new section to the migration guide # Test Plan Added a test to `test-suite` and tested on `BareExpo` ✅
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )