This article will guide you to build your iOS app with Mobile source code
Prerequisites
Mobile Devices
- Supported iOS versions: 13+
Development Environment
We recommend to use macOS system as a development environment because:
- Able to develop cross platform Mobile application (Android, iOS).
- We got tons of utilities scripts that were mainly written in Bash Script, which tested and worked compatibly only with Unix environment.
We assume that you have experience in React Native projects and how to build React Native mobile apps. Please following this Environment Setup guide to set up the development environment for React Native (RN) project
- Node version >= 18
- Yarn version = 1.21.0
- React Native version: 0.73.9
Project structure
Folder packages: contains all main RN/Javascript code
Folder app: Contains entrypoint for each module section from folder `packages`. Do not change anything here, we got the script to handle these generated code
Folder ios: Contains ObjectiveC/Swift native code - mostly handle native things for iOS app
Folder scripts: contains all utilities scripts
Setup
Configuration
You can update our mobile configuration and assets for iOS app in:
- Copy ios/configuration_example.json to ios/configuration.json file and configure this file with proper value
- Set `merchantId` to enable Apple Pay
- Firebase config file ios/GoogleService-Info.plist
- Please refer this guide to download it from your Firebase project for iOS app
Mobile assets
- Update images in the folder ios/Mobile/Images.xcassets/AppIcon.appiconset
- Update splash screen: You can run following command to generate splash screen after updating app icon
yarn react-native generate-bootsplash splash/splash.png --background-color=<your_background_color> --logo-width=100 --assets-path=assets
Load configuration
Whenever you change the configuration files above, you need to re-run these steps again:
yarn install yarn config-app
Run your iOS app
Start React Native metro package manager
yarn start
Run the following commands to start iOS app on iOS simulator
yarn ios-run