Skip to content

irf87/price-scraper-app

Repository files navigation

Intro

This is the app client of Price scraper server

Step 1: Start the Metro Server

yarn start

Step 2: Start your Application

For Android

yarn android

For iOS

Set-up

Only first time

cd ios && pod install && cd ..
yarn ios

If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.

This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.

Run storybook

yarn run storybook:web

To generate apk

create assets folder in the current project (only if doesn't exist)

$ mkdir android/app/src/main/assets

execute this to avoid errors cleaning react-native cache

npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ --reset-cache

create bundle script (if you already install in local react-native, omit npx)

$ npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

execute command to run android to create debug apk (if you already install in local react-native, omit npx)

$ npx react-native run-android

change to android folder

$ cd android

build debug apk

$ ./gradlew assembleDebug

install app

$ ./gradlew :app:installDebug

the apk new apk is in below path:

/android/app/build/outputs/apk/debug

Quick Build (Alternative Method)

You can also use the simplified build script that combines all the above steps:

yarn build:android

The APK will be generated at:

android/app/build/outputs/apk/debug/app-debug.apk

Icon Configuration

Android

The project is already configured to use Material Icons from react-native-vector-icons. The configuration is done in android/app/build.gradle.

iOS

To ensure icons work properly on iOS:

  1. Make sure the following fonts are listed in ios/PriceScrapperApp/Info.plist under UIAppFonts:
<key>UIAppFonts</key>
<array>
    <string>MaterialIcons.ttf</string>
    <string>MaterialCommunityIcons.ttf</string>
</array>
  1. Run the following commands to link the fonts:
cd ios
pod install
cd ..

Building APK for Android

When building the APK for Android, the icons will be automatically included in the build. No additional steps are required.

To generate a release APK:

cd android
./gradlew assembleRelease

The APK will be generated at android/app/build/outputs/apk/release/app-release.apk

Release Process

To create a new release:

  1. Make sure all your changes are committed
  2. Run the release command:
yarn release

This will:

  • Update the version in package.json
  • Generate/update the CHANGELOG.md
  • Create a git tag
  • Push the changes and tag to GitHub

The GitHub Actions workflow will automatically:

  • Build the Android APK
  • Create a new GitHub Release
  • Attach the APK and CHANGELOG.md to the release

Note: Make sure your commit messages follow the Conventional Commits specification for proper changelog generation.

git push --follow-tags origin main

About

App client for prices-scraper API's, build with react-native

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors