Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hiveku.com/llms.txt

Use this file to discover all available pages before exploring further.

A “native module” is any React Native package that ships compiled iOS/Android code — anything that pokes at the device’s hardware or OS APIs. These behave differently in the phone-frame preview (which runs React Native Web) than on a real device. This page is the cheat sheet so you don’t waste a 30-minute build finding out.

The three buckets

BucketBehaviorExamples
Pure JSWorks everywhere identicallyMost utility libs, date-fns, zod, react-hook-form, lodash
Web-supported nativeWorks in preview AND on deviceNativeWind, React Navigation, expo-router, expo-linking, expo-image (web fallback)
Native-onlyStub or no-op in preview, real on deviceexpo-camera, expo-notifications, expo-secure-store, expo-haptics
Native + needs rebuildNative-only AND requires Build & Ship to take effectAll of the above when added/upgraded

When you need a Build & Ship vs OTA

The decisive question: does the package add files under node_modules/.../ios/ or android/?
  • Yes → adding or upgrading the package means a Build & Ship. The previous binary doesn’t have the new native code; an OTA can’t deliver it.
  • No → it’s pure JS. OTA can deliver the change.
You can check this fast: after npm install <package>, look in node_modules/<package>/. If you see ios/ or android/ directories, it’s native. The Hiveku AI knows this — when you ask it to add expo-camera, it’ll include “you’ll need to Build & Ship after this lands” in its response. If you ask it to add date-fns, it’ll say “OTA is fine.”

Common native modules and their preview behavior

Hardware access

ModulePreview behaviorReal device
expo-cameraBlack rectangle (no fallback)Real camera
expo-image-pickerBrowser file pickerNative picker (camera roll)
expo-barcode-scannerBlack rectangleReal scanner
expo-locationReturns null from getCurrentPositionAsyncReal GPS
expo-sensors (Accelerometer, Gyroscope)All zerosReal sensor data
expo-hapticsNo-opReal haptic feedback
If you build a “scan my receipt” feature, the preview can’t validate it. Publish to Preview channel and open on a real phone with Expo Go to test.

Storage & secrets

ModulePreview behaviorReal device
expo-secure-storeFalls back to localStorage (insecure)iOS Keychain / Android Keystore
@react-native-async-storage/async-storagelocalStorageNative AsyncStorage
expo-file-systemNo-op (read-only mock)Real filesystem access
expo-sqliteStubReal SQLite
The Supabase client in the starter uses expo-secure-store for session persistence on device, and falls back to localStorage on web — so authentication works in both. Custom encryption flows that require hardware-backed crypto (Keychain) won’t actually be hardware-backed in preview.

Notifications & background

ModulePreview behaviorReal device
expo-notificationsNo-opReal push notifications
expo-task-managerNo-opReal background tasks
expo-background-fetchNo-opReal background fetch
expo-keep-awakeNo-opKeeps screen on
These only work after a Build & Ship to TestFlight + a real device install. There’s no preview path; OTA can’t deliver them either if not already in the binary.

Auth providers

ModulePreview behaviorReal device
expo-auth-session (Google, Apple)Falls back to web flow (popup)Native sheet
expo-apple-authenticationRefuses (not supported on web)Real “Sign in with Apple” sheet
@react-native-google-signin/google-signinWeb SDK fallbackNative flow
Sign-in with Apple is required by App Store rules if you also offer Google sign-in. Add the entitlement in app.json and Build & Ship — no preview path.

UI / animation

ModulePreview behaviorReal device
react-native-reanimatedWorksWorks (faster — runs on UI thread)
react-native-gesture-handlerMostly works (web pointer events)Native gestures
react-native-skiaWorks (slow on web)Works (native GPU)
lottie-react-nativeWorksWorks
expo-blurWorks (web blur filter)Native blur
Heavy animation testing is best on a real device — the web build’s frame budget is different from native. Layout and basic transitions are fine to validate in preview.

Common picks for the v1 starter

The Native Mobile starter ships with:
  • react-native, react, expo, expo-router, expo-status-bar, expo-secure-store, expo-splash-screen
  • react-native-safe-area-context, react-native-screens, react-native-gesture-handler, react-native-reanimated, react-native-url-polyfill
  • nativewind + tailwindcss
  • @supabase/supabase-js
  • @tanstack/react-query, react-hook-form, zod
  • lucide-react-native
All of these work in both preview and on device. Adding any of them to your project does not require a special build — they’re already linked.

Packages to think twice about

Some packages are technically supported by Expo but bring a steep cost. Avoid unless you really need them:
PackageCostAlternative
react-native-vision-cameraHeavy bundle (+8 MB), requires custom configexpo-camera for most use cases
react-native-skiaHeavy bundle (+14 MB), GPU-boundCSS gradients via NativeWind for simple effects
react-native-firebaseConflicts with Expo’s native modules, complex setupfirebase JS SDK (works fine for most use cases)
react-native-webviewAdds real WebView native codeLinking.openURL for one-off external links
react-native-bottom-sheetForces a config plugin + custom buildModal stack from Expo Router
Custom audio/video processing libsNative compilation breaks frequentlyExpo AV is the supported path
The AI in the chat will tell you if you ask for one of these, suggesting the alternative. You can override and continue, but expect a longer first build.

What an AI agent will and won’t do for you

The AI knows the difference between OTA and Build & Ship. When you ask it to add a feature:
  • JS-only feature (“add a search bar to the items list”) — applies via OTA, no rebuild. AI says: “Published to preview. Refresh your phone.”
  • Native-dep feature (“add camera-based receipt scanning”) — AI installs expo-camera, modifies the screen, and includes “this needs a Build & Ship — click the button on the Builds page” in its response.
  • Forbidden combo (“add Stripe Native SDK”) — AI refuses or steers you to @stripe/stripe-react-native which Expo supports, and tells you the rebuild is required.
When the AI is wrong (it sometimes thinks a package is pure-JS when it ships native code), you’ll find out at build time. The decoded error usually points at the package — re-trigger with Fix with AI and it’ll switch course.

Detection in the editor

When you save a package.json with a new native dependency, the editor flashes a banner:
Native dependency added: expo-camera — this change needs a Build & Ship to reach devices. OTA Update will not deliver it.
That’s your prompt to plan the build. You can keep iterating in JS first (say, building the UI for the camera feature with placeholders), then click Build & Ship once the surrounding code is solid.

What’s next

Builds & Submissions

Run the Build & Ship for changes that need it.

Phone-Frame Preview

Test JS-only changes in preview before any rebuild.

Mobile Quickstart

Full path from project creation to first TestFlight upload.

Mobile Credentials

Make sure your Apple + Google credentials are connected before triggering a native build.