Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DivyaniPatel96 authored Jul 29, 2024
1 parent 8510864 commit 5baccb7
Showing 1 changed file with 77 additions and 15 deletions.
92 changes: 77 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ The app can also operate in an offline mode in environments with limited interne
## Technology stack

* [React Native](https://reactnative.dev/)
* Project is set with Latest version of react native:
* React native - 0.72.5
* Several React Native modules have been incorporated in order to speed up the development.
* Refer to [package.json](https://github.com/UNICEFECAR/parenting-app-bebbo-mobile/blob/main/package.json) for more details.
* [TypeScript](https://www.typescriptlang.org/)
* TypeScript was used as a programming language.
* The same source code compiles into iOS and Android applications.
* [NPM](https://nodejs.org/en/)
* NPM (Node Package Manager) was used to install third party packages and to run various scripts necessary during development.
* Node version - 21.7.3
* NPM version - 10.3.0
<!--
* [Storybook](https://storybook.js.org/)
* Storybook was used to create visual tests for many components and services used in the application.
Expand Down Expand Up @@ -83,14 +87,20 @@ git clone https://github.com/UNICEFECAR/parenting-app-bebbo-mobile.git
```
2. Install NPM packages (DO NOT USE yarn!)
```sh
npm install --legacy-peer-deps
npm install
```
3. Only on Mac, go to "ios" folder, and run
```sh
pod install
```
Before running iOS App on Device, necessary certificate setup from Apple developer account is required.
After each time pod install, copy [CP-User] [RNFB] Core Configuration && [CP-User] [RNFB] Crashlytics Configuration in each target’s build phases if missing from main target (ParentBuddyApp)
After each time pod install, copy [CP-User] [RNFB] Core Configuration && [CP-User] [RNFB] Crashlytics Configuration in each target’s build phases if missing from main target (ParentBuddyApp). In Project use below targets. Project Target is only for mac users.

**Project Target:**
1. ParentBuddyApp - Bebbo Production target
2. ParentBuddyAppDev - Bebbo Development target
3. ParentBuddyAppXk - Foleja Production target
4. ParentBuddyAppXkDev - Foleja Development target

**Steps to add script:**
* Click on target’s build phases add on + sign.
Expand Down Expand Up @@ -136,9 +146,11 @@ After each time pod install, copy [CP-User] [RNFB] Core Configuration && [CP-Use
![alt text](https://github.com/UNICEFECAR/parenting-app-bebbo-mobile/blob/main/referenceImages/ReadMe/Copy_Input_Crashalytics_File.png)

4. Copy fontello.ttf file from https://github.com/UNICEFECAR/parenting-app-bebbo-mobile/blob/main/app/assets/fonts/fontello.ttf to node_modules/react-native-vector-icons/Fonts
Refer this library for custom fonts: https://github.com/oblador/react-native-vector-icons
Refer this library for custom fonts: https://github.com/oblador/react-native-vector-icons. We need the fontello.ttf file in the node modules to be used only for iOS.

5. For Android, Add keystore files into \android\app folder to generate Android build.

5. Configure Firebase services
6. Configure Firebase services
- [Create Firebase project](https://console.firebase.google.com/)
- Add iOS and Android apps to Firebase project the standard way
- Use Firebase wizards to create these:
Expand Down Expand Up @@ -181,15 +193,17 @@ Refer this library for custom fonts: https://github.com/oblador/react-native-vec
https://github.com/UNICEFECAR/parenting-app-bebbo-mobile/tree/main/ios/GoogleServices/XkDevelopment
```
6. Configure google Signin and GDrive Import/Export
7. Configure google Signin and GDrive Import/Export
* Configure Google Signin and GDrive Import/Export
* Enable Google Drive API from Cloud Console.
* Choose Scope For Drive Access
* Copy details of REVERSED_CLIENT_ID as in the below example from GoogleService-Info.plist
and add in .env file as projectNumber and clientIdKey.
* Format in GoogleService-Info.plist will be like com.googleusercontent.apps.${projectNumber}-${clientIdKey}
7. Steps required while creating Flavour builds. Follow below steps for Bebbo Prod and ProdStaging
8. Steps required while creating Flavour builds for both Bebbo and Foleja.
**1.** Follow below steps for **Bebbo Prod and ProdStaging**:
* In apiConstants.ts change buildFor const value to buildForBebbo as follows :
Expand All @@ -199,6 +213,52 @@ Refer this library for custom fonts: https://github.com/oblador/react-native-vec
* In tsconfig.json keep dynamicImportsClass value to ./app/bebbo/* as follows :
```
"@dynamicImportsClass/*": ["./app/bebbo/*"]
```
* In metro.config.js keep blacklistRe value to /xk\/.*/ as follows :
```
blacklistRE: blacklist([/xk\/.*/])
```
* In babel.config.js keep dynamicImportsClass value to ./app/bebbo as follows :
```
'@dynamicImportsClass': './app/bebbo'
```
* Run below command to generate vector images based on flavour folders for both Android and iOS :
```
npx react-native-vector-image generate
```
* Create .env file at project root and add below 6 variables in it. The variables below contain sample data for example purposes. :
```
apiUrlDevelop = 'https://hostname.com/api' (server api endPoint)
facebookAppDisplayName=AppDisplayName (For Facebook Analytics.Get these details from Facebook developer console)
facebookAppId=9856432678543908 (For Facebook Analytics.Get these details from Facebook developer console)
facebookClientToken=f67tr342356dsa233987kl56784v (For Facebook Analytics.Get these details from Facebook developer
console)
projectNumber=453789238965(For Google SignIn. Get it from step 5)
clientIdKey= bhjr6wdgddvv3k87tteq9fds6po3nm7 (For Google SignIn. Get it from step 5)
encryptionsKey=d64e6a977f5643er90h8y5jk123n8bd88630jh56d34ddec874566342209y34 (Key for encryption)
encryptionsIVKey=nm4532wsd67cv087452xci876bui9765 (Key for encryption)
```
**2.** Follow below steps for **Foleja Prod and ProdStaging**:
* In apiConstants.ts change buildFor const value to buildForFoleja as follows :
```
export const buildFor = buildForFoleja;
```
* In tsconfig.json keep dynamicImportsClass value to ./app/xk/* as follows :
```
"@dynamicImportsClass/*": ["./app/xk/*"]
```
Expand All @@ -209,29 +269,31 @@ Refer this library for custom fonts: https://github.com/oblador/react-native-vec
blacklistRE: blacklist([/bebbo\/.*/])
```
* In babel.config.js keep dynamicImportsClass value to ./app/bebbo as follows :
* In babel.config.js keep dynamicImportsClass value to ./app/xk as follows :
```
'@dynamicImportsClass': './app/xk'
```
* Run below command to generate vector images based on flavour folders :
* Run below command to generate vector images based on flavour folders for both Android and iOS :
```
npx react-native-vector-image generate
```
* Create .env file at project root and add below 6 variables in it :
* Create .env file at project root and add below 6 variables in it. The variables below contain sample data for example purposes. :
```
apiUrlDevelop = 'https://hostname.com/api' (server api endPoint)
facebookAppDisplayName=XXXXXXXXXXXX (For Facebook Analytics.Get these details from Facebook developer console)
facebookAppId=XXXXXXXXXXXX (For Facebook Analytics.Get these details from Facebook developer console)
facebookClientToken=XXXXXXXXXXXX (For Facebook Analytics.Get these details from Facebook developer console)
projectNumber=XXXXXXXXXXXX (For Google SignIn. Get it from step 5)
clientIdKey=XXXXXXXXXXXX (For Google SignIn. Get it from step 5)
facebookAppDisplayName=AppDisplayName (For Facebook Analytics.Get these details from Facebook developer console)
facebookAppId=9856432678543908 (For Facebook Analytics.Get these details from Facebook developer console)
facebookClientToken=f67tr342356dsa233987kl56784v (For Facebook Analytics.Get these details from Facebook developer
console)
projectNumber=453789238965(For Google SignIn. Get it from step 5)
clientIdKey= bhjr6wdgddvv3k87tteq9fds6po3nm7 (For Google SignIn. Get it from step 5)
encryptionsKey=d64e6a977f5643er90h8y5jk123n8bd88630jh56d34ddec874566342209y34 (Key for encryption)
encryptionsIVKey=nm4532wsd67cv087452xci876bui9765 (Key for encryption)
```
## How to run
After you install the application you can create build files for various flavors with below npx commands.
Expand Down

0 comments on commit 5baccb7

Please sign in to comment.