Skip to content

Expo rewrite to let us showcase Expo-related features - #131

Merged
alwx merged 6 commits into
masterfrom
alwx/expo-rewrite
Sep 29, 2026
Merged

alwx merged 6 commits into
masterfrom
alwx/expo-rewrite

Conversation

@alwx

@alwx alwx commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Most of our users use Expo nowadays but our sample app doesn't. In addition, we've recently introduced a bunch of Expo-related features that you cannot showcase without Expo.

What this PR does

Rewrites the demo app using Expo (managed workflow), replacing the bare React Native setup with native android/ and ios/ directories.

Fixes getsentry/sentry-react-native#6490

This is a literal migration — all parts of the app have been ported to Expo. The large number of affected lines is due to the structural change (removing native project directories, replacing entry point, adopting Expo config), not functional changes.

What's there:

  • All 10 screens migrated (Shop, Cart, Debug screens)
  • Sentry.init with the same integrations and configuration
  • Redux, all components, utilities, Maestro tests — that all remains unchanged

Intentionally swapped for Expo equivalents:

  • react-native-vector-icons -> @expo/vector-icons
  • react-native-linear-gradient -> expo-linear-gradient
  • react-native-dotenv -> Expo-native EXPO_PUBLIC_* env vars
  • Native build scripts (build-dev-android etc.) migrated to Expo CLI (expo start, expo android)
  • android/, ios/, Gemfile removed — Expo handles the native layer via EAS

As 99% of the code remains unchanged, the best way to verify it is by running it and checking that the data is correctly being sent and handled by Sentry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alwx alwx changed the title Expo rewrite Expo rewrite to let us showcase Expo-related features. Sep 9, 2026
@alwx alwx changed the title Expo rewrite to let us showcase Expo-related features. Expo rewrite to let us showcase Expo-related features Sep 9, 2026
@alwx
alwx marked this pull request as ready for review September 9, 2026 07:37
@antonis
antonis requested review from antonis and nw-sentry September 9, 2026 07:48
Comment thread src/screens/HomeScreen.tsx
Comment thread src/screens/ProductDetailScreen.tsx
Comment thread app.json Outdated
Comment thread app.json Outdated
Comment thread app.json Outdated
Comment thread app.json Outdated
Comment thread .github/workflows/build-android.yml Outdated
Comment thread package.json Outdated
Comment thread app.json Outdated
Comment thread App.tsx

@antonis antonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work migrating the app to Expo @alwx 🙇 We can iterate on top of this to add all the latest Expo features (router etc) and showcase them in our demo :)

Overall looks good. I've left some comments inline.

@nw-sentry

Copy link
Copy Markdown
Contributor

This is a great change! Thanks so much for taking on this challenge.

However there is a key detail about how we generate the test data automatically using this repo:
https://github.com/sentry-demos/empower runs automated Appium tests (_tda) to generate demo data. Those tests don't build this repo, instead they simply download the prebuilt app-release.apk straight from the latest GitHub release and drive the app by UI selectors.

I'll run some manual testing to verify it still works 👍

alwx and others added 4 commits September 14, 2026 16:45
Restore CI/release workflows via expo prebuild, fix app.config.js
(bundle ids, Sentry org/project, dynamic version, expo-system-ui),
fix Android/iOS safe-area and scroll bugs, and align the SE env var
convention between the app and github_release.sh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Restore CODEOWNERS, lint/prettier configs and the lint script, and the
release artifact uploads in github_release.sh. Carry over native settings
that had no Expo equivalent: iOS display name, local-networking ATS
exception, and the build number / versionCode sequence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
expo-linear-gradient and expo-status-bar were never imported (the bare RN
app didn't use a gradient either, so the swap carried over a dead dep).
Point the README and troubleshooting docs at the prebuild flow CI actually
uses instead of EAS, which was never configured here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Expo SDK 57's expo-modules-jsi uses `weak let`, which needs Swift 6.3 /
Xcode 26.4. The macos-15 image is too old and fails while building the
ExpoModulesJSI xcframework. Document the same failure for local builds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alwx
alwx requested a review from antonis September 15, 2026 12:09
Comment thread app.config.js

@antonis antonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for iterating on this @alwx 🙇 Looks great 🚀
Added a couple of comments on the configuration side.

babel-preset-expo inlines EXPO_PUBLIC_* from the bundler process env at
transform time, so the value has to be present for the gradlew/xcodebuild
step that builds the bundle. release.yml builds the release APK in CI, and
the TDA pipeline consumes that APK from the GitHub release -- without this
it ships with SE undefined and the beforeSend fingerprint never fires.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alwx
alwx requested a review from antonis September 24, 2026 09:33
@alwx

alwx commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@nw-sentry could you also give it another round of review?

@antonis antonis left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my side 🎉
Thank you for your work on this Alex 🙇

Let's also wait for @nw-sentry to approve before merging.

@nw-sentry nw-sentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome! Thanks so much for doing this

@alwx
alwx merged commit bb2fb10 into master Sep 29, 2026
8 checks passed
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.

Migrate Empower Plant to Expo and showcase Expo-related features

3 participants