Theory - Android Development
- Basic
- React Native is a framework
- Maps and Compiles re-usable components to respective platform equivalents
- Alternative to React DOM which is used for web development with React library
- Logic written in javascript is not compiled but hosted as threads in the native app
- Debugging in VS Code
- Download React Native Tools Extension > Go to Run and Debug to create launch.json file
- Select React Native > Attach to packager > Ok
- Go to Settings > Search "react-native.packager.port" > Change it to "19001"
- Open "Run & Debug" > "Attach to packager" > "Start Debugging" > Reload the App
- Expo Client
- Metro Bundler => Compiling all files into a single file
- Publish or Republish project => Publish your project on expo directory
- Developer Menu
- Reload
- Debug Remote JS => JS code of the app will execute of Chrome, Used for debugging => Can also debug in VS Code after closing it in Chrome
- To run IOS Simulator
- Download Xcode > Open it
- Go to Xcode > Preferences > Locations > Command Line Tools > Make sure it is installed
- Go to Xcode > Open Developer Tools > Simulator
- Go to File > Open Device > iOS 13.4 > Choose between different devices
- Go to Metro Bundler > Run on iOS simulator
- To run Android Simulator
- To run of Physical Device
- Download Expo Client
- Scan the QR Code
- Devices should be connected to the same network
- Shake the phone to open Developer Menu
- Types to Build
- Expo CLI
yarn create expo-app appName
cd appName
yarn start
npm run android
npm run ios
=> Requires an iOS device or macOS for access to an iOS simulator
- React Native CLI
- Build App
- For APK
npm install -g eas-cli
eas login
eas whoami
eas build:configure
eas build -p android --profile preview
- For Play Store
eas build --platform android
eas build:list
- ES6 Syntax
rsf
=> React Stateless Function
rnss
=> React native Style sheet