“TrainEasy Mobile ” Documentation by “Intermatics” v1.0


“TrainEasy Training   Learning Management System App ”

Created: 4/7/2019
By: Intermatics
Email: info@traineasy.net

Thank you for purchasing our item. If you have any questions that are beyond the scope of this help file, please feel free to email via our user page contact form here. Thank you!


Table of Contents

  1. Installing Node.js
  2. Installing Ionic and Cordova
  3. Installing packages
  4. Running on browser
  5. Running on android
  6. Running on ios
  7. Folder Structure
  8. Pointing to your API

1) Install Node.js - top

If you dont have Node.js already installed on your computer, then you need to install it first. To verify whether Node.js is already installed on your computer please run this command.

node -v

If this returns you a version number then that means node.js is installed on your computer. e.g) In my case it is returning "v10.16.0" If you get any error, then we need to install Node.js.

Installing Node.js is very easy. Visit Node.js website You will see a download option for your Windows or MacOS. Download the one where it says "Recommended for Most Users" and simply run the installer. When the installation is finished you should be able to run this command.

node -v

2) Install Ionic and Cordova - top

If you dont have already installed Ionic or Cordova then you need to install them first. This command will install cordova and ionic both globally, so you can access them from anywhere in your machine.

npm install -g cordova ionic

Installation could take some time depending on your internet connection.


3) Installing packages - top

The Zip file you downloaded from "codecanyon" will contain a folder called "source_code". Now go into that directory and run this command from that directory.

npm install

This will install all the packages from package.json file. Wait for installation to get finished.


4) Running on Browser - top

To run your template on your browser you need to run this command from your "source_code" directory.

ionic serve

This will launch a browser and run the template.


5) Running on Android - top

If you have Android SDK setup on your machine, Then you can run the ionic app template on your android. You need to run this command from your "source_code" directory.

ionic cordova build android

This will create android build. If build is created successfully, then you can run this command.

ionic cordova run android

This will install it as APK and run on your device.


6) Running on IOS - top

NOTE: Apple has restriction, thats why you will need a MacOS to run IOS Apps on your Iphone. You can't do this on windows.

If you have MacOS and XCode is setup on your MacOS then you can run the ionic app template on your ios. You need to run this command from your "source_code" directory.

ionic cordova build ios

This will create ios build. If build is created successfully, then you can run this command to run on your iphone.

ionic cordova run ios

NOTE: Some times your build may get failed. It could be due to different reasons, either you have code signing issues, or you may have not choosed the `Team` in xcode.

If you get errors, then you can manually open project by going to "source_code/platforms/ios" and run the project in Xcode. and Xcode will show you what error you are getting. You can also run in on simulator.


7) Folder Structure - top

The source code is available in this directory

source_code/src

Global app level code is available in this directory.

source_code/src/app

and

source_code/src/theme

All the page level code is available in this directory

source_code/src/pages

Inside "source_code/src/pages" directory each page has its own folder and that folder contains all the files related to that page.


8) Pointing to your API - top

This app was built to work with the TrainEasy web app API. You will need to purchase and install a copy of TrainEasy before you can use this app. You can buy it here: https://codecanyon.net/item/traineasy-training-management-registration-system/19457888 .
Once your TrainEasy web app is installed and working, you will need to update the api in your Ionic app to work with your installed application. To do so, please open the file located at src/app/config.ts . You should see code as below:

export const CONFIG = {
   apiUrl:'https://demov1.traineasy.net/api/v1'
}

You need to change text https://demov1.traineasy.net to point to your server. Ensure you do not remove the quotes (') or the api string (/api/v1) . Also ensure there are no spaces after you change the code


Once again, thank you for purchasing this item. As I said at the beginning, we will be glad to help you if you have any questions relating to this item.

Intermatics

Go To Table of Contents