Skip to content

Repository files navigation

RN-Production

A React Native app framework built for shipping to the stores: camera, splash screen, privacy consent, QR scanning, FaceID, gesture passwords, a component library, shared helpers, RNConsole, pull-to-refresh, a packaging CLI, WeChat sharing, a compatible JSBridge and rematch.

react-native 0.68 react 18 typescript 5.9 iOS and Android license

Changelog · 中文文档


Commands

pnpm install
pnpm start          # Metro
pnpm ios            # run on the iOS simulator
pnpm android        # run on Android

pnpm lint           # eslint
pnpm tslint         # tsc --noEmit
pnpm test           # jest (pure-logic unit tests)
pnpm format         # prettier + eslint --fix

Before you start

Screens the app passes through on launch: the native splash screen → FrontInfoCarousel (the one-time feature tour shown after install) → HomeTab → Home.

Global cache keys — rename them to suit your product:

Key Meaning
isPopSecret Whether the privacy notice has been shown. Not per-user; shown once.
frontInfo Whether the feature tour has been shown. Not per-user; shown once.
userGesturePasswordObj The user's gesture password. Only one is kept, so effectively not per-user.
isFaceId Whether FaceID is currently permitted. Used only on the FaceID screen; noFaceId means no permission, and need not be cleared on logout.
lastActiveTime When the app last went inactive, used to decide whether re-authentication is needed on resume.

Android Studio needs the API level 31 SDK platform (compileSdkVersion is 31, minSdkVersion is 24) and JDK 11 — see facebook/react-native#33731.

What to change first

  1. Everything marked TODO in the comments depends on your product.
  2. The package name and bundle ID (see below).
  3. The privacy notice, and the privacy usage descriptions in the iOS/Android configuration.
  4. The app icon, splash screen and feature-tour images.

Renaming the package

Doing this by hand misses things. Use react-native-rename:

pnpm add -g react-native-rename
npx react-native-rename "rnProduction" -b com.rn.production

A few places it does not reach:

  1. android/app/src/main/AndroidManifest.xml — the package name in the application node.
  2. iOS — rename and set the version in Xcode, then:
cd ios
pod deintegrate
pod install

Native SDK notes

Changing native code needs a rebuild — a React Native reload is not enough.

"No permission handler detected" after packaging

See react-native-permissions:

If you see a No permission handler detected error: make sure that you have at least one permission handler set up. In some cases the Xcode cache needs to be cleared (Xcode → Product → Clean Build Folder).

Contributing

See CONTRIBUTING.md.

License

MIT

About

Production-ready React Native app framework: camera, splash, privacy consent, QR scan, FaceID, gesture password, component library, JSBridge, WeChat share and rematch. RN 上架级框架

Topics

Resources

Contributing

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages