Paul Bădărău

React Native vs native iOS: choosing the client boundary

A practical React Native versus native iOS decision guide from shipping food logging, travel, audio, image editing and WidgetKit apps in real production.

A 2.0.3 React Native app sat beside a 2.0.0 Swift app and a 1.0.0 Kotlin app in the same food-tracking repository, which gave me a concrete way to compare the client boundaries. The React Native app shared iOS and Android package identifiers and had an Expo Application Services production profile with submission configuration; the Swift and Kotlin apps talked directly to a Cloudflare Worker and kept data on the device, while React Native described a Rails-backed serialisation contract for a food entry.

I've shipped both cross-platform and native apps. A food logger and a travel journal didn't need every product rule in Swift, while a live audio meter, an on-device image editor, and a child-health log with WidgetKit each had a specific reason to be native. I choose from where the risk sits and whether one extra client boundary costs less than two implementations.

React Native wins when the product is mostly a boundary around an application

Food logging has enough device work that the choice isn't obvious: people type a meal, photograph it, or scan a barcode, and expect entries, fasting, water, and fitness history to survive a train tunnel. Still, the hard part is showing an uncertain estimate and storing the record the person chose, rather than rendering 120 frames-per-second graphics. A description or photo becomes calories, protein, carbohydrates, fat, and named items for review before saving, while a barcode reads public per-100 gram nutrition fields from Open Food Facts.

The React Native and Expo client had the highest declared version (2.0.3) and a production EAS build and submission config, though configuration alone only shows release readiness. Meanwhile, SwiftUI used SwiftData and Android used Room, both calling the Cloudflare Worker directly, while React Native pointed towards Rails as the source of truth. The iOS client creates a device UUID, adds platform and App Attest headers, compresses photos towards 1 MiB before base64 encoding, times out requests, and retries a retryable failure once after two seconds; the Worker allows attested callers 100 AI requests a day and others 10, with a 25-second upstream timeout.

Camera input, local persistence, purchases, notifications, and secure storage all exist in React Native, and each needs an owner when Apple or Android changes it plus a real-device check before release. Shared UI stays cheaper while those native edges stay thin, which holds for account-based products where forms, search, feeds, server-backed settings, and subscriptions don't improve just because the screen is Swift; keep domain types in TypeScript, keep one API contract explicit, and spend the saved time where users notice it.

The travel journal has a similar shape. Rails owns journeys, places, photos, permissions, map providers, and private file delivery, while the iPhone app is a native UIKit shell around the Hotwire interface that bridges the camera, photo library, and location on demand. That bridge asks only for when-in-use permission, returns an error if denied, rounds coordinates to two decimal places, and exposes no better than 1,000 metres of accuracy. A cross-platform client could do the same job; the choice is a separate runtime versus three defined bridges and a web product you already trust.

Native iOS earns its cost at the real-time boundary

The sound meter starts an AVAudioEngine input tap in measurement mode, receives 2,048-frame PCM buffers, calculates an A-weighted dB(A) estimate in memory, updates the display, and tears the audio session down when measurement stops. Its signal path applies a Hann window, a complex forward DFT, the IEC 61672 A-weighting curve on each bin, an inverse DFT, a corrected RMS, and 10 × log10(meanSquare), flooring silence at -120 dBFS. The view model applies a 0.25 exponential moving average, tracks session minimum, mean, and maximum, holds a decaying peak, and warns after 30 seconds above 85 dB.

React Native can wrap that in a native module, adding JavaScript bridge lifecycle, permissions, buffering, and diagnostics. If Android is required, the extra boundary can pay for itself; for an iPhone-only product whose value lives inside the audio callback, keeping the path in Swift is simpler. The sound meter has 34 unit-test methods across six files covering invalid FFT sizing, a full-scale 1 kHz sine, A-weight attenuation at 100 Hz, silence, calibration clamping, access state, and trial expiry, while UI tests skip live microphone capture and check screen flow. Because phone microphones report dBFS, the app offers an estimate using a documented 120 dB offset and plus or minus 10 dB calibration against a reference meter. For live signal paths, AR, low-latency video, custom camera processing, or physical accessory protocols, start native so you can use first-party APIs and memory profilers directly.

Image processing is native when memory is part of the feature

The photo editor lets someone tap subjects, lift each into a transparent layer, move, scale, rotate, flip, retouch with a soft mask, replace the background, and export. It uses Apple's on-device subject lifting via ImageAnalyzer and ImageAnalysisInteraction, redraws tapped cutouts onto a full-frame transparent canvas to preserve framing, runs Core Image for blur, pixelation, and masked blending, and composes layers with UIKit source-over drawing.

Inputs are normalised for orientation and capped at a 3,072-pixel longest edge at scale 1, staying well under the 8,192-pixel Vision limit and avoiding a 3x device-scale expansion. The editor renders 1,600-pixel previews, exports at the prepared canvas size, caches cutout effects until an effect changes, and waits for gestures to end before baking bitmaps; it also converts opaque Core Image output to noneSkipLast RGB to drop unused alpha and avoid ImageIO warnings. A JavaScript UI wouldn't remove enough native work to pay for another boundary here, and if Android needs matching quality, budget a separate Android investigation before promising identical exports.

WidgetKit changes the shape of a small app

The child-health log stores profiles, temperature readings, symptoms, medicines, notes, photos, appointments, vaccines, and growth records in a Core Data model with nine entities and optional CloudKit sync across private and shared stores. A cross-platform stack could render those screens, except WidgetKit turns the app into an extension system.

The widget never opens Core Data. After launch, after switching the focused child, and after a Core Data save, the app recalculates a compact WidgetSnapshot, writes widget-snapshot.json atomically into a shared App Groups container, and asks WidgetKit to reload timelines. To avoid stale relative strings, the widget stores the next dose as a date, moves from "OK after" to "OK now" when the interval ends, and keeps a 30-minute fallback refresh. When a widget drives retention or safety, its data contract, privacy markings, deep links, and refresh rules need a native owner; meanwhile, App Store Connect uploads still leave review submission manual, and StoreKit, CloudKit, and widgets need checks beyond TypeScript and the simulator.

The release path decides more than the code generator

I haven't used Ignite or Hetzner for these products, so I can't recommend either from this work.

Choose the release path alongside the architecture. The nutrition tracking app has EAS production build and submission config, which makes the route explicit without replacing an acceptance test against the real backend, camera permissions, purchases, deep links, and notifications. Over-the-air JavaScript updates can't fix a missing entitlement, a broken native dependency, a bad privacy declaration, or a StoreKit error in a binary already in review.

Every client boundary needs testing in a release-like build on real hardware: the iOS food client with its compiled Worker URL on a poor connection, the travel journal's UIKit shell enforcing Rails session checks so signed-out users get not-found on private blobs, and the child-health repository's CloudKit sharing across two devices and two Apple IDs before production. My checklist stays architectural: what data is local, what state is a server contract, which extension reads it, which entitlement gates it, and what requires a new binary. For scoping an early build, the cost is mostly in the decisions you haven't made, and the integration checklist covers the AI-service boundary; I choose the client around whichever part carries the most risk.