Skip to content

PPIUK/Palapa

Repository files navigation

create-react-native-app

PPI UK Mobile Application

Discover Indonesia in United Kingdom

Supports Expo iOS Supports Expo Android

PPI UK Mobile app use React Native and Expo Managed Workflow. Expo is a set of tools built around React Native

Installation

React Native

Please refer to React Native Installation Docs for setting up the development environment including all the requirements such as

  • Node 14 LTS

Expo

Please refer to Expo Installation Documentation for setting up the development environment including all the requirements. To install Expo use this command

  • npm install --global expo-cli

IOS Simulator / Android Emulator (Recommended)

IOS Simulator only available on Mac with Xcode, and Android Studio emulator available on Windows and Mac with AndroidS Studio. Make sure to Set up the virtual device according to related Documentation

Available Scripts

If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.

npm start

Runs your app in development mode.

Open it in the Expo app on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal.

Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the --reset-cache flag to the start script:

npm start --reset-cache
# or
yarn start --reset-cache

npm run ios

Like npm start, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.

npm run android

Like npm start, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see React Native docs for detailed setup). We also recommend installing Genymotion as your Android emulator. Once you've finished setting up the native build environment, there are two options for making the right copy of adb available to Create React Native App:

Using Android Studio's adb

  1. Make sure that you can run adb from your terminal.
  2. Open Genymotion and navigate to Settings -> ADB. Select “Use custom Android SDK tools” and update with your Android SDK directory.

Using Genymotion's adb

  1. Find Genymotion’s copy of adb. On macOS for example, this is normally /Applications/Genymotion.app/Contents/MacOS/tools/.
  2. Add the Genymotion tools directory to your path (instructions for Mac, Linux, and Windows).
  3. Make sure that you can run adb from your terminal.

npm run eject

This will start the process of "ejecting" from Create React Native App's build scripts. You'll be asked a couple of questions about how you'd like to build your project.

Warning: Running eject is a permanent action (aside from whatever version control system you use). An ejected app will require you to have an Xcode and/or Android Studio environment set up.

npx expo-env-info

Environment variables are global values that are defined in your system. This script shows all the environment variables including the Expo Workflow: managed

--legacy-peer-deps

Dependencies sometimes cause conflict errors when running command, however we can ignore these conflict because it doesn't affect the program. Use it with the commant you want to use, for example

  npm install --legacy-peer-deps

Deployment

see the expo documentation here

Configure app.json (Android)

  • When uploading to google play, make sure expo.android.versionCode is different (incremented) than any versonCode uploaded before. This versionCode can be changed in app.json file

  • expo.android.permissions also has to be set to [] or minimal permission needed, see the docmentation here. This however, could be changed in the future development depending on the feature of the app.

Building Standalone Apps

When building standalone apps, SDK 46 is the last SDK supported by Classic Builds and the Classic Build service will stop running for all SDK versions after January 4, 2023. Instead, use EAS Build.

Classic Build

Classic Builds service allows you to create standalone binaries for the Expo app using the Expo CLI. You can use that binary to submit the app to the Apple App Store and Google Play Store or test on emulators.

There are two types of build you can generate when building a standalone app for Android: an APK or an Android App Bundle (aab).

make sure to follow all the steps in the classic build documentation

EAS Build

EAS Build allows you to build a ready-to-submit binary of your app for the Apple App Store or Google Play Store.

make sure to follow all the steps in the EAS build documentation

Android app signing credentials

  • If you have not yet generated a keystore for your app, you can let EAS CLI take care of that for you by selecting Generate new keystore, and then you are done. The keystore is stored securely on EAS servers.
  • If you have previously built your app with expo build:android, you can use the same credentials here.
  • If you want to manually generate your keystore, please see the manual Android credentials guide for more information.
  • For this project keystore information is stored in root folder with file name keystore.txt
  • you can use this command to see and manage the credential
    expo credentials:manager
    

Google Form, Sheets, MongoDB

Google Form

Event organizer and Restaurant owner first has to fill google form with all the required field. These submission then will be stored in google sheets automatically

AppScript

Data from Google Sheets then will be stored in MongoDB database automatically with AppScript. Each week on Monday, the AppScript trigger will activate to update the data from Google Sheets to MongoDB. If there is any changes you would like to update outside the designated trigger time, then open AppScript and Run the script. If any authorisation/authentication issue arises, see the documentation here

Support and Contact

If you're having issues with Create React Native App, please make sure:

  • The issue is not covered in the Expo Docs
  • There is not already an open issue for your particular problem

If you've checked the documentation and currently open issues, please either open a new GitHub issue or ask a question on Expo forums.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published