Book Image

Getting Started with NativeScript

By : Nathanael J. Anderson
Book Image

Getting Started with NativeScript

By: Nathanael J. Anderson

Overview of this book

NativeScript allows you to build a fast cross-platform application that has a native UI. NativeScript is a true cross-platform framework that generates native speed applications using the native components of the host platform, all using JavaScript. Although NativeScript allows you to build your application in JavaScript, you have full access to the host OS from your code, allowing you to easily tweak or use new platform features instantly at native code speeds. Whether you have already developed multiple applications or zero applications, this book will help you to develop your next application in a cross-platform framework quickly, saving you a massive amount of time and money. This book concisely shows you NativeScript’s built-in framework that allows you to rapidly develop a fully-working compiled cross-platform application in just a few chapters. It starts by laying the foundation of NativeScript and working through the fundamentals to create a basic shell of the application. Moving on, you’ll see how to build a full-fledged application step by step. We’ll show you how to use plugins, and how to communicate with the native OS libraries easily so that you can customize your application as if your app was created in Java or Objective C. We then deal with the issues that arise from being cross platform and compensate for the different screen sizes, screen resolutions, and device abilities. Finally, we progress to testing and deploying your app.
Table of Contents (15 chapters)
Getting Started with NativeScript
About the Author
About the Reviewer

Publishing your application

On Android, you need to build the application using nativescript build android --release --key-store-path=<yourfile> --key-store-password=<your password> --key-store-alias=<alias> --key-store-alias-password=<password>. This will build you a release version of your APK. The APK's location is going to be in your applications/platforms/Android/build/outputs/APKs. Make sure you do not take your debug package, as it will be rejected by all the app stores. You need a key to sign your application so that Google (and others) knows that this application is from you and only from you.


To create a keystore, you can use the keytool program that comes with the Android SDK. The keytool program allows you to create, edit, and delete keys inside the store file. However, there is a cross-platform open source project at, which is a graphic user interface to edit and create your keystore.

Once you have built your...