npm install -g cordova
cordova create MyApp com.MyCom.MyApp MyApp<code> - the whole web content is under ./www/ folder - add target platform <code>cordova platform add web cordova platform add android // web cordova platform add browser@5.0.1 // check platform by cordova platform ls // check requirement by cordova requirements // test run on browser cordova run browser
//build all cordova build // build android cordova build android // build android release insteal debug apk cordova build android --release
cordova run
sudo npm install -g cordova
xcode-select --install sudo npm install -g ios-deploy // note, if you fail above, you may need type based on error msg: sudo npm install -g ios-deploy --unsafe-perm=true
cordova requirements // most likely it will ask you to install pod, here is command, and it take a while sudo gem install cocoapods pod setup
cd ~ mkdir nodeProj;cd nodeProj cordova create HelloApp com.HelloCom.HelloApp HelloApp cd HelloApp cordova platform add ios cordova build ios
// run in emulator cordova emulate ios // compile for device will error signing required, you may need addition workaround if you dont have paid developer account from apple cordova build ios --device // if you want to do simply, open the project with Xcode, the top left UI take you choice on deploy device drop list and real device list, // of course, if you have Apple ID (not necessarily paid program account), if you select top App name in left hierarchy view panel, you can use personal account (Team as Personal Team) to create a free-6-day deloy cert in code signing section open ./platforms/ios/YourAppName.xcworkspace/
Note
Update iOS from main cordova project
cordova platform rm ios cordova platform add ios
cordova plugin add cordova-plugin-inappbrowser
<allow-navigation href="http://*.yoursite.com/*" />
inside <meta http-equiv="Content-Security-Policy" make it something like this https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline';
<a href="#" onclick="cordova.InAppBrowser.open('http://yoursite.com/test.html', '_self', 'toolbar=no');" >Go</a>
Generate Icons and Screen for platforms