(Set up is different for M1 arch)
- Deintegrate pod files
cd ./ios
pod deintegrate
- Install Packages
npm install --legacy-peer-deps && yarn install
- Re-install pod files using Rosetta
arch -x86_64 pod install
- Build and run in sumilator
npx react-native run-ios --simulator "iPhone 14 Pro Max"
- Clone the repo(https://github.com/cnoott/lootswap_mobile.git)
- cd lootswap_mobile (Come inside app root folder)
- On terminal, run
yarn install
oryarn
, It will install node modules - Install Pods, run
cd ios
& thenpod install
- Start a Server ->
cd ..
&&yarn start
We have 2 environment -> 1) Production 2) Development (All run commands are specified in package.json file)
- To Run Production Environemnt, run ->
yarn ios:prod
- To Run Development Environemnt, run ->
yarn ios:dev
You can also run from xcode directly by changing schema & run
We have 2 environment -> 1) Production 2) Development (All run commands are specified in package.json file)
- To Run Production Environemnt, run ->
yarn android:prod
- To Run Development Environemnt, run ->
yarn android:dev
You can also run from androis studio directly by changing build varient
If you want to change any environment variable like changing APP_URL
or need to add New one then you have to make changes in environment specific files
- To Chnage Development Config -> Make changes in
.env.development
file on root folder - To Chnage Production Config -> Make changes in
.env.production
file on root folder When you will run project then this files content will automatically replaced in.env
file.
- If you change env variables and it doesnt update when you run dev, try the following
yarn cache clean
yarn start --reset-cache
- Clean build on Xcode
- Close Simulator
- Run on Xcode
We use the versioning standard of 'a.b.c.' where a is for major updates b is for feature updates c is for minor fixes/changes
Some updates (such as native code changes or package installs) must be manually updated through the AppStore. Its important to make sure that the user has the correct base version of the app in order to recieve a certain OTA update
- Change Info.plist to reflect the new version number.
- Go the the backend to match that number.
- Make sure the Project selected at the top is "lootswap_mobile"
- Do clean build witha "Any IOS Device (arm64) target
- Select Project > Archive > Distribute App
- Go to AppStore connect and submit new version for verification
** Make Sure that you are on a production environment when pushing new version **
- Do a production build on Xcode.
- Release new version to product making sure that MINIMUM_BASE_VERSION matches what is currently in the Info.plist
appcenter codepush release-react -a liamaamadio/lootswap-ios -d Production --target-binary-version ">=MINIMUM_BASE_VERSION < MAX_VERSION" --mandatory true
- After releasing a CodePush OTA update, you now can do an AppStore update so that new users dont have to. We group these versions together. For example, version 2.6.4 + CodePush OTA is equivalent to AppStore version 2.4.5
We only change Info.plist version number when its a AppStore update