Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 2.01 KB

README.md

File metadata and controls

57 lines (49 loc) · 2.01 KB

App47 Cordova 7.x Example Project

Clone this repository or download the zip. The sample project just contains the HTML and Javascript for the sample app but most of the work is done by the Cordova command line interface to set up the project and the plugin. Note, the plugin in use in this project can be found at the App47 Cordova-7.x repository.

Setting up the project

You need to have Cordova installed on your system. You can find out how to install Cordova at Get Started Fast

  1. Create the project
$ cordova create cordovatest com.mycompany.cordovatest CordovaTest
  1. Change to the project folder
$ cd cordovatest
  1. Add the platform(s) you want to support, can just add ios, android or both
$ cordova platform add ios android 
  1. Add the App47 plugin
$ cordova plugin add https://github.com/App47/Cordova-7.x
  1. Copy the source files to the project's www folder
$ cp -R [path-to-clone]/cordova-7.x-example/wwww/* ./www

Building and running on Android

For Android you will need to be running JDK 1.8 or higher

  1. Build the Android app
$ cordova build android 
  1. Run on Android emulator
$ cordova emulate android 
  1. Run on Android device
$ cordova run android --device

You can also open the project in AndroidStudio by Import Project and selecting the platforms/android folder. For more information on using Cordova with Android see the Android Platform Guide

Building and running on iOS

  1. Build the iOS app
$ cordova build ios
  1. Run the iOS app on the simulator or optionally a device
$ cordova run ios [--device] 

You can also open the iOS project in Xcode by opening platforms/ios/CordovaTest.xcworkspace and running from there. For more information on using Cordova with iOS see the iOS Platform Guide