feat: create expo config plugin#2
Open
MalcolmTomisin wants to merge 4 commits into
Open
Conversation
Replaces the manual app.json edits and AppDelegate snippet copy-paste with a first-party Expo config plugin. Consumers pass `iosClientId` once and the plugin handles the reversed Client ID injection into CFBundleURLSchemes and the application(_:open:options:) URL forwarder during prebuild. `@expo/config-plugins` is declared as an optional peer dependency so bare React Native CLI users don't install Expo tooling they won't use. Supports both Swift and Objective-C AppDelegates. Idempotent via a marker comment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the hand-rolled `ios.infoPlist.CFBundleURLTypes` block in example/app.json with a plugin entry that derives the reversed iOS Client ID at prebuild time. Demonstrates the canonical Expo pattern and removes the brittle "remember to update the placeholder when the client ID changes" footgun. Declare the library as a workspace dependency so Expo's plugin resolver can locate it in example/node_modules. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- README: add "Using Expo?" callout at the top of iOS Setup pointing bare-RN users to the manual steps below, and a new "Expo config plugin" section covering install, app.config entry, props table, and the Expo Go incompatibility note. - CONTRIBUTING: add `yarn build:plugin` to the script reference and document the plugin test suite location. - ROADMAP: check off Phase 6 (Expo Support) items now that the plugin, example coverage, and docs are all shipped. The existing manual iOS setup snippets stay verbatim — bare React Native CLI users see one extra callout and skip it; their setup section is unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`withInfoPlist` and `withAppDelegate` pass the modified config to their callback as the same parameter name (`config`) that the outer `ConfigPlugin` already binds. Rename the inner parameter to `mod` (matching its `modResults` field) so the no-shadow lint rule passes without disabling it. Also exclude `plugin/build/` from eslint so the compiled CommonJS output doesn't get linted as TypeScript source — same pattern we already use for `lib/`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Added an expo config plugin to reduce set up steps on Expo