Last time I showed you how you how to build a mobile phone app in 5 minutes using Angular. This time I will show you how to download, compile and install the app on your phone.
To build the app you will need to install NativeScript Sidekick. You can download it here.
Next, you will need to download the source code from the playground. Head to my example project and press the Download button.
Launch NativeScript Sidekick and open the folder containing the source code you just downloaded (press the Open App button).
The buttons on the left let you configure the app e.g. title, description, icon, splash screen etc.
The buttons along the top let you run commands. We want to build our code so press the Build button.
Apple will only let you build an app if you have a developer account, which is outside the scope of this tutorial. If you already have an Apple Developer account go ahead and click the iOS button and import your certificate and provisioning profiles. Sidekick lets you build and deploy iOS apps on Windows.
Android does not require a developer account. To begin an Android build press the Android button followed by the Build button.
If this is your first build it may take a few minutes to finish. Be patient. Eventually, you will be rewarded with a successful build.
Installing your app
To install the app on your Android phone you will need to unlock the developer options.
- Go to your device Settings.
- Select About phone and tap seven times on Build number. This will enable Developer options under Settings.
- Go back to Settings and scroll down until you see Developer options.
- Open Developer options and scroll down until you see the Debuggingmenu, enable USB Debugging.
Grab a USB cable, unlock your phone and plug it into your computer. Wait a few seconds for the computer to recognise your phone and accept any popups which appear on your phone.
If your device has been recognised you will see your phone in Sidekick. If not, restart Sidekick and/or unplug your phone and try again.
To install the app on your phone press the Run on Device button. When the build has finished the app will pop up on your phone.
To prove the app has been installed, unplug your phone from your computer, open the app drawer and look for the NSPlayground icon.
Building a mobile phone app with Angular and NativeScript is easy. Sidekick guides you through the process of building, debugging, configuring and publishing (to the app stores). You just need come up with an idea for the next $1,000,000 app. Good luck!