Repository navigation
feat: add Expo example app - #47
Merged
Merged
Conversation
Add example-expo/, a minimal Expo SDK 58 (RN 0.88) dev-client app that uses the config plugin and shows availability, permission request, the last 7 days of steps and an aggregate. - Wire it into the yarn workspaces (yarn example:expo). - Typecheck it in CI (lint job). - Exclude build output (lib/) from the root tsconfig so typecheck passes after yarn prepare. - Document Expo dev-client setup in README and docs/install.html.
Merged
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
Adds
example-expo/, a minimal Expo app that uses the library through its config plugin. Follow-up to the competitor review:react-native-health-connectships an Expo example, and we only had a bare RN one.The app shows four things:
READ_STEPSpermission request.COUNT_TOTAL) for the same 7 days.Setup
expo-dev-client), not Expo Go.app.jsonregisters the config plugin withpermissions: [READ_STEPS]. It also setsminSdkVersion29 withexpo-build-properties, because Expo's default is lower than the library's minimum.metro.config.jsusesreact-native-monorepo-configso Metro resolves the library from this repo's source.android/is generated by prebuild and git-ignored.Repo wiring
example-expois added to the yarn workspaces, with a newyarn example:exposcript.yarn example:expo typecheckstep. No Expo Android build in CI; it would be a second full Gradle build.tsconfig.json: now excludesexample-expo, which has its own tsconfig, andlib/. Without thelib/exclusion,yarn typecheckand the pre-commit hook fail afteryarn prepare, because they pick up the generated.d.tsfiles.example-expo/, the same asexample/.Docs
npx expo prebuild,npx expo run:android) and the minSdk 29 note, and links the example.docs/install.html: new step "04 Expo" with theapp.jsonsnippet, the commands and a link to the example. The later steps are renumbered.example-expo/README.md: run instructions.Verification (local)
npx expo prebuild --platform androidsucceeds. The generated manifest hashealth.READ_STEPS, both Health Connect intent filters (ACTION_SHOW_PERMISSIONS_RATIONALE, andVIEW_PERMISSION_USAGE+HEALTH_PERMISSIONS), andandroid.minSdkVersion=29. Autolinking resolves the library.npx expo export --platform android: Metro bundles the app (601 modules).yarn example:expo typecheckpasses, and fails as expected when I add a deliberate type error.yarn typecheck,yarn lintandyarn test --coveragepass (231 tests, coverage gates met).yarn install --immutableand.github/scripts/check-versions.shpass.npx expo run:androidon a device. There is no Android SDK on this runner.No library code changes; the supported RN range is unchanged.