The nice thing about Apache Cordova is that you can develop APPs for both Android and iOS simply using vanilla Javascript. You can then add whatever library with which you feel comfortable, like Bootstrap or jQuery, for example. You can also use ES6 if you prefer.
Apache Cordova is though a bit cumbersome to start with due to the software requirements. Furthermore if you never programmed for Android or iOS, you might feel a bit insecure with all this terminology.
Though instead of a long detailed explanation, I will just provide a short todo list on how you can have your first program to run as fast as possible. You’ll have to investigate further if you get stuck on a specific step, or feel free to leave a comment or question on the comment section below.
TLDR from official documentation
This is a TLDR from official documentation. I apply this for Android, but for iOS is very easily adaptable.
1. Install NodeJS.
For Debian/Ubuntu check instructions here.
Confirm this step went OK by running in console node -v; npm -v
Run sudo npm install -g cordova
(for OS X and Linux) or npm install -g cordova
(for Windows)
Confirm this step went OK by running in console cordova -v
3. Install Java Development Kit (JDK) 8.
For Debian/Ubuntu sudo apt install openjdk-8-jdk
.
Be sure you're using the correct version, namely openjdk version "1.8.*"
, by running in console java -version
4. Install Gradle.
For Debian/Ubuntu sudo apt install gradle
.
Confirm this step went OK by running in console gradle -v
5. Install Android command line tools.
The "light setup" is here, since you don't need the huge Android Studio.
For Debian/Ubuntu you can simply run sudo apt install android-sdk
Unzip the file and be sure to that all the unziped binaries are accesible via the PATH
. For example in Linux add these lines to ~/.bashrc
if you installed the Android command line tools into ~/Android/Sdk/
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
PATH=$PATH:$ANDROID_SDK_ROOT/emulator/
PATH=$PATH:$ANDROID_SDK_ROOT/emulator/bin64
Confirm this step went OK by running in console
sdkmanager --version
avdmanager
Warnings in sdkmanager are acceptable
Check the ones you have already installed with
sdkmanager --list
To be sure, further install
sdkmanager --install 'cmdline-tools;latest' 'platform-tools' 'build-tools;30.0.3' 'platforms;android-30' 'cmake;3.18.1' 'extras;google;simulators' 'extras;google;webdriver' 'extras;google;auto'
sdkmanager --install 'emulator' 'system-images;android-30;default;x86_64'
Check if you have any AVD and then create one if necessary
avdmanager list avd
avdmanager create avd
cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add android
Check requirements with cordova requirements
cordova emulate android
Fell free to ask questions in this comment section