LangaraBeetles / weaup-react-native-app

1 stars 0 forks source link

beetles-mobile

Installation

yarn install

Run

To just start the Expo server

yarn start

To clear the cache and start the Expo server

yarn restart

or with the Android emulator

yarn android

or with the iOS emulator

yarn ios

Note

If prompted to log in, use this

yarn expo login -u YOUR_USERNAME -p YOUR_PASSWORD

Build

https://docs.expo.dev/build/setup/

SDK Environment Variables

Add a file called local.properties in your android directory and add the path to your Android SDK like this:

for Windows

sdk.dir=C:\\Users\\YourUsername\\AppData\\Local\\Android\\Sdk

for macOS/Linux

sdk.dir=/Users/YourUsername/Library/Android/sdk

EAS

npm install -g eas-cli
eas login
eas build --platform android
eas build --platform ios
eas build --platform all

Local Build

Build for iOS

npx expo run:ios

Build for Android

npx expo run:android

Re-build

If you're developing locally:

npx expo prebuild

If you're using Expo EAS:

eas build --profile development --platform android

Native IOS Module

npx create-react-native-library@latest ios-headphone-motion
yarn
cd ios
pod install
yarn ios --device

Important Links

Relative paths

To add more relative paths, update the files:

  • tsconfig.json
  • babel.config.js

Headphone Motion Module

Documentation: https://github.com/XHMM/react-native-headphone-motion

These are the steps I followed to create the module

npx expo prebuild --clean

npx create-react-native-library@latest ios-headphone-motion

yarn install

npx expo install expo-build-properties # to define the minimum development target for ios, it must be 15^

These are the commands to run the app

npx pod-install

yarn ios --device

I created a new command to achieve the same

yarn ios:pods

iOS build and submit

 npx expo prebuild
 eas build --platform ios
eas submit -p ios