Installation
IonFire is an Ionic 3 mobile app and you'll need Cordova to package it for iPhone and Android.
Prerequisites:
- make sure you have NodeJS v6 or higher installed and Npm v3 or higher
- you'll also need Ionic and Cordova installed globally:
npm install -g ionic cordova
Installation:
- unzip the archive
- install the necessary npm packages:
cd ./mobile && npm install
- create
www
folder inside./mobile
folder - install cordova platforms and plugins:
cordova prepare
This will create theplatforms
andplugins
folder
(you can run the steps above with one command: cd ./mobile && npm install && mkdir www && cordova prepare
)
Setup integration with Google Firebase real-time database:
- Sign-up for Google Firebase - it's free (skip this step if you already have an account)
Create a new project in Google Firebase (click on Add Project and fill-in a name)
rename
./mobile/src/app/app.config_sample.ts
toapp.config.ts
in Firebase, click Add Firebase to your web app
copy the config values and paste them in
firebaseConfig
(inapp.config.ts
)set the following rules in the Realtime Database > Rules to make sure users of the mobile app can only read the data from the database
You can now run the app using: npm run ionic:serve