I built the foundation and the release pipeline for a React Native app for fleet drivers, and led it from my prototype to the App Store and Google Play. Drivers use it to find the best place to fuel nearby, check amenities, see where to weigh their truck, and keep an eye on their spending and limits. These are the choices I'd make again, and a few traps worth knowing about.
The stack
Expo with Expo Router, but without EAS, mostly to avoid the subscription; native folders are generated on every build and kept out of git. Server data lives in TanStack Query, client state in small Zustand stores (one per domain), and forms in TanStack Form. We deliberately didn't port the web app's patterns over: a phone has different problems.
Design tokens in one file
Every colour, radius and type size lives in one CSS file, as a Tailwind v4 @theme block, and components use them through utility classes (Uniwind brings Tailwind to React Native). A few places can't use classes, like animated styles and SVG props, so a small typed TypeScript file mirrors the raw values for those. It's kept in step by hand, with a comment at the top saying so.
- The designbrand guide, designs in Figma
- One CSS filebrand colours, then semantic roles
- Used two waysUtility classesalmost every componentTyped mirroranimations, SVG, navigation theme
- Checkedtoken stories in on-device Storybook
The tokens come in two layers. Brand colours first, then semantic roles that components actually use: background, surface, ink, muted, border, and success, warning, error and info. Components never use a raw hex value. When a design arrives in Figma, the agent reads it through the Figma MCP server and maps it onto those roles.
Two things I learned along the way:
- React Native won't fake a font weight. With a custom font,
fontWeight: '600'silently does nothing; you need the semibold file itself. So the tokens include a map from weight to font file. - Light only, on purpose. The brand has no dark mode, so instead of a half-designed one, dark surfaces are an explicit choice on the components that need them.
There's also a DESIGN.md next to the app that describes the system in a form AI agents read before touching any UI.
A typed API the app can't break
The app talks to its own API, separate from the web app's, so a change made for the website can't quietly break the phone. CI generates a typed client from that API's OpenAPI spec, so a renamed field fails the build instead of crashing in a driver's hand.
And because people don't update apps the day you ship, old versions keep calling your API for weeks. So API changes are additive only, and anything breaking gets a new version. The app also reads a "recommended" and a "minimum" version from the server, and asks people to update, or makes them, when it falls behind.
Sign-in that doesn't log people out
All requests go through one shared fetch wrapper. When several requests find the session expired at the same moment, they share a single refresh and each retries once. Only a real "not allowed" answer from the server signs someone out; a flaky network never does. Biometric sign-in unlocks a token that the phone's own keychain holds, and simulators don't enforce the biometric check, so that part has to be tested on a real device.
Release: ship the build the testers used
The pipeline is Fastlane, run from GitHub Actions workflows that someone starts on purpose. You type in the version, and the build number is the workflow's run number, so it always goes up.
- BetaFirebase App Distribution for testers
- Store test trackTestFlight, or Play internal testing
- Check on devicesthe team tries the actual store build
- Submit that buildthe same binary, no rebuild
- Prompt to updateraise the recommended or minimum version
That last part is the one I'd keep above everything else: the store build goes to TestFlight or Play's internal track first, and the release submits that same uploaded build instead of building again.
The full pipeline, and every trap on the way to the first green build, is in Shipping an Expo app with Fastlane instead of EAS. The short version:
- iOS signing uses Fastlane
match. Runsetup_cibefore it in CI, orcodesignhangs for about 22 minutes waiting for a keychain prompt nobody will answer. - Google Play wants the very first upload done by hand.
- Caching Gradle cut one Android job from 12 minutes 14 seconds to 7 minutes 23.
Things that only break in the real build
- Reproduce in the build that ships. Some map marker bugs only appeared in release builds on iOS, never in development.
- Measure before theorising about performance. Counting React commits per second on a real interaction told us more than timing things on an emulator. On the map, smaller state and stable keys took one pan from 48 commits to 18.
- Network-aware isn't the same as offline. The app checks real reachability and pauses data fetching while it's gone, but it keeps no offline copy of the data, so we never called it offline support.
Testing on devices with an agent
For checking flows on simulators, I used argent, an MCP server from Software Mansion that lets an AI agent drive the simulator, compare screenshots, profile and record flows you can replay. Before any submission, the team checked the beta and store-track builds by hand.