Getting Started
npx create-start-ui --native myApp
That will scaffold a new folder with the latest version of
Then just go to the created folder cd myApp
and follow the Installation Guide.
Technology
âī¸ React Nativeâī¸ React Navigation- âŦĸ Native Base 3
âī¸ TanStack Queryđ Formizâ Axiosđē Mirage JS
Installation
- Install project dependencies
yarn install
-
Set up your local environment config
- Copy the
environments/dev/config.js
in theenvironments/local
folder - Replace the
ENV: ENVS.DEV,
line withENV: ENVS.LOCAL,
within theenvironments/local/config.js
file. - Run the
yarn set:env:local
command.
- Copy the
-
Then follow the Android Installation Guide or iOS Installation Guide.
Android
Android Installation
- Follow the "Installing dependencies" of React Native CLI Quickstart for Android
Android Development
- Run the development server
yarn dev
- In another terminal
yarn android
Android Release
Generate keystore
The first time you will release your app, you will need to generate a keystore
./scripts/generate-android-certificate.sh
And then, follow the instructions.
Then, you need to update the RELEASE_KEY_STORE_PASSWORD
and RELEASE_KEY_PASSWORD
into the android/gradle.properties
file.
You should not keep this in the git history. Use a password manager or other secured solution to keep this file.
â ī¸ DO NOT LOOSE IT. YOU WILL NOT BE ABLE TO RELEASE YOUR APP.
Generate Bundle file for releases on Play Store
We are using Android App Bundle on this project. This is a new and more efficient way to package an Android application.
Based on the environment that you need to target run one of the following command:
yarn android:bundle:dev
# or
yarn android:bundle:staging
# or
yarn android:bundle:prod
The Bundle file will be available at android/app/build/outputs/bundle/release/app.aab
â ī¸ You can test the release application with the APK version (next section) on your device before uploading the bundle file on the Play Store (Especially for production release).
Generate APK for testing release on device
If you want to generate the release APK for testing the release configuration on your device before sending the bundle to the PlayStore, you can use one of the following commands based on the target environment:
yarn android:build:dev
# or
yarn android:build:staging
# or
yarn android:build:prod
The APK will be available at android/app/build/outputs/apk/release/app-release.apk
and will be installed on your connected device.
iOS
For iOS development you need to be on a Apple computer with macOS.
iOS Installation
- Follow the "Installing dependencies" of React Native CLI Quickstart for iOS
For Apple chips (M1) also run the following command
sudo arch -x86_64 gem install ffi
- Install pods
Processor type | Command line |
---|---|
Intel chip | yarn ios:install:intel |
Apple chip (M1) | yarn ios:install:arm |
iOS Development
- Run the development server
yarn dev
- In another terminal
yarn ios:open
This will open the project in Xcode.
- Click on the "Play" button on Xcode.
iOS Release
- Setup your targeted environment
yarn set:env:dev
# or
yarn set:env:staging
# or
yarn set:env:prod
- Open Xcode
yarn ios:open
- Follow the Publishing to Apple App Store documentation.
Important note about Info.plist
With the evolutions on the project, if you need to update Info.plist
, please update all Info.plist
in all ios
subfolders.
Environments
Environments variables are managed thanks to the subfolders in the environments
folder:
- local: Your local environment, when developing on your computer
- dev: For your app internal testing
- staging: For your app alpha/beta/testflight testing
- production: For your production app release on the stores
This approche allows us to have dependent environment files, like Firebase configurations (google-services.json and GoogleService-Info.plist), that will be copied when you'll release, which is not possible with react-native-dotenv for instance.
You can switch environment with one of the following commands:
yarn set:env:local
# or
yarn set:env:dev
# or
yarn set:env:staging
# or
yarn set:env:prod
Devtools
We provide some devtools that can be accessed from the dev menu.
You can open it by typing d on the yarn dev
console.
You will find the following tools:
- Storybook
- Network helper
Updating the Application Name
When you need to update the application name and to remove "Start UI Native" references, please use this library:
npx react-native-rename "My Amazing App"
Updating the Application Icons
Application Icons for Android
You can use Launcher icon generator online tool to generate the icon files for Android:
Download and extract the .zip file it into android/app/src/main/res/
folder.
Application Icons for iOS
For iOS, you can use Icon Set Creator for MacOS.
https://appicon.co/ online tool.
And then, import these images into a new image assets into xcode. You can follow this tutorial for example.