A React Native Typescript Template which included necessary lib and configurations for a mobile app:
- State Management: Redux / Redux Persist / Redux Toolkit
- Animation: Reanimated 2 / Moti / Lottie
- Infrastructure: React Native Config
- Form
- NodeJS >= 14.x
- Android Studio 2020.3.1 Patch 4
- xCode 13.0
[TBD]
- Dependencies
$ npm install -g app-icon
ImageMagick
version7.1.0-27-Q16-HDRI-x64-dll
- Remember to tick
Install lagecy tools (e.g convert)
- Remember to tick
- Icon file size 1024x1024
- Generates new icon
$ app-icon generate -i assets/icon-android.png -p android --background-icon assets/icon-android-background.png --foreground-icon assets/icon-android-foreground.png --adaptive-icons
$ app-icon generate -i assets/icon-ios.png -p ios
- Generates new splash screen
$ yarn react-native generate-bootsplash assets/splashscreen.png --background-color=FFFFFF --logo-width=200
- Icon & Splash generator: https://appicon.co
- Tutorial: check
react-native-splash-screen-tutor.png
inguides
folder for setup guide - Notes:
- Create new
Image Set
namedlaunch_screen
insideImages.xcassets
and drag and drop images into 3 blocks - To create
Image View
, selectView
layer then click+
button on the top right of the xCode, find theImage View
then drag into theView
- Android: Add following to prevent the white/black splash before splashscreen
- Create new
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowDisablePreview">true</item>
</style>
- IMPORTANT: If this plugin installed along with
rn-firebase
(notification), the iOS will crash when reopen app. To fix this, add newView
to iOS nameLaunchScreen
then copy configuration of existingLaunchScreen
to new one