Create Mobile app with Cordova
IDE: https://netbeans.org/kb/docs/webclient/cordova-gettingstarted_zh_CN.html
On Mac Step 1. set up cordova , create project
- npm install -g cordova
- cordova create my-mobile-app
- cd my-mobile-app
- cordova platform add ios
- cordova platform add android
- cordova requirements (show requirements info)
cordova plugin add cordova-plugin-camera cordova plugin add cordova-plugin-device cordova plugin add cordova-plugin-network-information cordova plugin add cordova-plugin-device-motion cordova plugin add cordova-plugin-device-orientation cordova plugin add cordova-plugin-geolocation cordova plugin add cordova-plugin-file cordova plugin add cordova-plugin-file-transfer cordova plugin add cordova-plugin-dialogs cordova plugin add cordova-plugin-vibration cordova plugin add cordova-plugin-contacts cordova plugin add cordova-plugin-globalization cordova plugin add cordova-plugin-splashscreen cordova plugin add cordova-plugin-inappbrowser cordova plugin add cordova-plugin-console
Step 2. modify html and js files cd /my-mobile-app/www
- edit index.html
- edit ./js/index.js
Step 3. build app
- cordova build ios
- cordova build android
Step 4. run app
- cordova run ios
- cordova run android