- Cordova
https://cordova.apache.org/docs/en/2.9.0/guide/cli/index.html
brew install node
tested on node 8.11. Older version might be incomptabile
sudo npm install -g cordova
cordova platform add ios
cordova platform add android
When adding a platform on cordova it will make sure it has all the tools to build that mobile app. It will therefore download all the plugins and cache them under plugins/
folder.
cordova platform add ios
cordova build ios
cordova platform add android
cordova build android
this will generate the apk/ipa files that can be later on released
cordova run android
cordova run ios
same process as above but it will fire up the application as well. The android app might not start with this command but it will be installed and it's just a matter of starting the app.
For iOS
cordova platform add ios
- Run
cordova prepare ios
to load all the necessary pods - Open XCode project
hellocordova.xcodeproject
onplatforms/ios
- Under frameworks folder remove the file Pods_HelloCordova.framework (when building by console this step is not necessary)
- Debug or Run app
For Android
cordova platform add android
- Run
cordova prepare android
to perform any necessary prep - Open
platforms/android
folder withAndroidStudio - Some version of AndroidStudio will ask you to sync the project with gradle on a popup
- If popup wasn't shown or when running the project you don't get the device selection screen: go to
File
andSync Project with Gradle File
-
Use the IDEs to build and modify the code and then copy it over to the cordova plugin folder
-
Copy each time the plugin folder manually into the
plugins/
folder.
cp -r ../cordova-usabilla/* plugins/cordova-usabilla
For the app to pick up the change you need to remove / add the platform.
- Copy plugin to
plugins/
folder cordova platform remove android
cordova platform add android
- Use plugman tool (it is a bit buggy in my opinion and doesn't copy hooks over)
plugman uninstall --platform ios -project platforms/ios/ -plugin ../cordova-usabilla/
plugman install --platform ios -project platforms/ios/ -plugin ../cordova-usabilla/