Main /
How to create iOS and Android BookApps(Note: Applies to EJS Version 6.0 and beyond, and IONIC version 2.) This short guide explains how to create an iOS or Android App that looks like a book with a number of previously packaged (ZIP) simulations (i.e. the process to follow to correctly use the Create Book App option of EJS menu.) Important note: Before you start with the process, please make sure that you generated all the models with the following Export option checked:
The steps to follow are: 1. Install the software platform called IONIC in your computer that allows you to create APPS from a given project structure. IONIC provides tools to create JavaScript+HTML programs that run on mobile devices as if they were native apps.
2. Create a basic IONIC project.
3. Use EJS to overwrite the IONIC basic project with the simulations files. That is, EJS helps you modify the contents of the basic project to create an APP that displays a book with all your simulations.
4. Test your modified IONIC project.
5. Fine-tune and deploy your App.
Step 1: Install IONIC in your computer (if you haven't done so before)The tasks in this step need to be done only once, no matter how many IONIC Apps you create. (Note: You need Internet connection for this.)
sudo npm install -g cordova
sudo npm install -g ionic
sudo npm install angular-ui-router
sudo npm install angular-sanitize
Step 2: Create a basic IONIC project for your appWe now exemplify the creation of an IONIC project called, say MyBookApp. In what follows, replace the word MyBookApp with the name you chose for your new book app. The tasks below need to be done once per model App you create. (Note: You need Internet connection for this.)
$ cd MyAppsFolder
$ ionic start MyBookApp blank This takes a few seconds... and creates a new directory (called MyBookApp) in your hard disk. (When asked: Would you like to integrate your new app with Cordova to target native iOS and Android? (y/N) , you can answer no: n) (When asked: Install the free Ionic Pro SDK and connect your app? (Y/n) , you can answer no: n)
$ cd MyBookApp
ionic cordova platform add ios (Actually, this 'add' is not needed on Mac OSX.) ionic cordova platform add android (You may need to edit the /android/project.properties file, to set the correct Android target version for your device.)
npm install @ionic-native/keyboard --save
npm install @ionic-native/splash-screen --save
npm install @ionic-native/screen-orientation --save
Step 3: Use EJS to overwrite the basic project filesSelect the Create Book App option in EJS menu and use the creation dialog to configure your Book App. When ready, click OK and, when prompted to select a directory, choose your newly created IONIC project folder (in our example, MyBookApp). This is all there is. Your IONIC project now has all the simulations files in place to make all your simulations configure a Book App. Step 4: Test the appYou are now ready to test the app.
This will show the app as a new page in your favourite browser in your computer. If you have the Ionic DevApp (available for free in your favourite App Store), you can also use test the app in your Device.
Step 5: Fine tune and deploy the appThere are a few final steps required to deploy your App to your mobile device.
|