What is NativeScript?
Basically Nativescript is a framework to compile TypeScript to a native code for Android and iOS. It utilizes Angular for most of the services, frontend-handling and injection-management. Build on top of this great Google-framework it’s a good start to build apps for both most used mobile platforms.
To start we will need to install some tools and run some scripts. This will only cover the happy path for Windows. For a full tutorial please look on the site of NativeScript.
The NativeScript CLI is an easy way to install all necessary additional tools like Java, Android SDK and NodeJs on Windows.
The installer will only work on machines that do not currently have an Android SDK installed. If you’re working on a machine with Android SDKs already in place, you will have to proceed with the manual installation.
To verify the installation run the following command in your console
Microsoft Visual Studio Code
I recommend to start with Microsoft Visual Studio Code as editor. Feel free to use your preferred editor.
Setting up a Test-project
Open a bash, navigate to the directory you want to create the test-project and type the following command:
tns create HelloWorld --template nativescript-template-ng-tutorial
This should create a new folder
HelloWorld and setup the environment for your NativeScript project. Navigate with the bash inside the new folder and type the following command:
tns run android
This will start your android emulator, install the test-project to the emulator, run the app and listen for changes in the project folder.
To make changes open the folder in your editor.
To bee continued…