Mobile App on local machine

Firebase App

  • Create a new Firebase app in your firebase console.
  • Add the respective iOS and Android apps. Use io.market.nativebase.geekyants.taskman as the package name & bundle identifier for Andorid & iOS .
  • Download GoogleService-Info.plist & google-services.json . Add GoogleService-Info.plist in MobileApp/ios/TaskMan & google-services.json in MobileApp/android/app folder .
  • Enable Authentication for Email/Password , Phone & Facebook (optional).

Deploying Functions

Generate new private key in firebase console (goto firebase console => project settings => service accounts

Goto Firebase folder and change project details in .firebaserc and firebase.js .

Incase you are not able to figure out all data then you can add another app (Add Firebase to your web app) and copy the details .

In Firebase console goto Develop -> functions and click on Get started and follow the instructions.

  1. In terminal goto Firebase/functions folder
  2. Run npm i
  3. Create an account in Stripe and get the testkey.
  4. Setup Stripe account and get api key .You can find key here
  5. run firebase functions:config:set stripe.testkey="YOUR_STRIPE_TEST_KEY"
  6. Goto Firebase folder and Run firebase deploy.

Seed Database

  • Go to Firebase console and enable Firestore .
  • Go to Firebase folder and copy the rules from firestore.rule file to the Firebase console in Develop -> Storage -> rules
  • Go to Firebase folder and then navigate to firestore-import-export folder and update serviceAccountKey.json along with databaseURL in expport.js file .

Enabling Storage

  • Go to MobileApp/storage.rules and copy the rules to the Firebase console in Develop -> Storage -> rules

Mobile App

Installation steps

Note: Before starting the mobile app, you need to export the Firestore database. Follow Steps from API

Steps to initiate the app.

  • Go to the MobileApp folder
  • Type npm i
  • Go to ios folder run pod install (For running app on ios)
  • Follow the steps from here to configure Firebase in iOS and click here to do the same for Android
  • Make sure you update the Firebase credentials in MobileApp/src/firebase.js with you app credentails .
  • If you are facing any issues or problems, follow these docs Steps to Create Fb App Id and making it live.
  • To create FbApp Id goto https://developers.facebook.com/.
  • Click on MyApps and click Add New App.
  • To create new AppId place your project ID in display name and enter your contact Email, click on create App ID.
  • Goto settings/Basic/ and addd Privacy Policy URL and click on save changes.
  • Click switch button on top right corner and choose category, and click submit to make app live.
  • In settings/Basic click on addPlatform and select Android. And provide Google Play Package Name, Class Name, Key Hashes.
  • You can find Google Play Package Name, Class Name in your Android Manifest or your app's build.gradle file.
  • And To generate Key Hshes, goto terminal and enter

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

  • Copy Generated key hash and add it in Key hashes.
  • Make Single Sign On On. After adding this details click on 'SaveChanges'.

  • In settings/Basic click on addPlatform and select IOS.

  • Enter Bundle Id, Iphone store Id, Ipad Store Id and make make ''Single Sign On" On and click on SaveChanges.

  • Open a code editor of your choice.

  • Add Facebook App Id for IOS: Navigate toMobileApp/ios/TaskMan/Info.plistline 28 replacefbAPP_IDwithfbYOUR_APPID& line 35 and replace APP_IDwithYOUR_APP_ID. For Android, navigate toMobileApp/android/app/src/main/res/values/strings.xmlline 4 and replace APP_IDwithYOUR_APP_ID.

  • NOTE: Make sure to run the TaskMan.workspace project

If you are getting issue while pod install delete podfile.lock in mobileApp/ios folder & then retry with doing pod install .

  • If you would like to run the app in Android, you need to connect an Android phone to a system or you can run the app on an Android emulator. Type
    react-native run-android
    Make sure that you have configured the AVD before running the command. If you would like to run app on an iPhone simulator(MacOS), run
    react-native run-ios
    .

Note : Incase you are getting error for FBSDK follow the link and make sure that you have downloaded FBSDk for ios in Documents Folder .

results matching ""

    No results matching ""