NativeScript v1.1.0 was just released a couple days ago. Here is what is new and how to get all the cool new features.
Some of the changes are:
- Exposing Application events as Real Event [example]
- Parent is now exposed in itemLoading event
- Repeater Component Added [more]
- TabView.selectedIndexChanged Event added
- Hint property for TextView
- NavigatingTo/From, NavigatedTo/From events added to Page component
- Search now has Hint Color
- Dozens of Bug Fixes
- View and GestureObserver classes has breaking changes [more]
If you are currently running version 0.9.0 or v1.0.0 then here are the steps to upgrade you to the wonderful version 1.1.0
Upgrading the NativeScript Tools:
First thing to do is upgrade your TNS (or NativeScript) command so go to a command prompt (if on windows it will probably need to be an Administrator command prompt) or bash/terminal prompt.
Type "tns --version" or "nativescript --version", if you already have version 1.1.0 then you can skip this step as you already have the latest nativescript tools.
Windows (from an Administrator prompt):
npm install -g nativescript
sudo npm install -g nativescript
This will update you to the latest version of the command nativescript command line. And you should type "tns --version" after to verify it has been upgraded to v1.1.0
Upgrading the Platforms:
Next thing you will need to upgrade is your "platforms", so navigate to the root level folder where your project is; and then if you are working on a Android project type:
tns platform update android
and/or (if you are working on a ios version on a Macintosh)
tns platform update ios
Upgrading the Common Library:
Unfortunately The next piece is a lot more tricky as it requires a lot more steps. Hopefully this will be fixed in v1.2.0. But right now it is a small bit of a pain. The easiest method is to create a new project and then copy the tns_modules out of the new project into your existing project and then delete the dummy project. So at a command line do the following (assuming your still in your main app project folder from the steps above). Please remember to replace <yourapp> with whatever folder name your app is in.
cd .. tns create testupgrade rd /S /Q <strong><yourapp></strong>\app\tns_modules move testupgrade\app\tns_modules <<strong>yourapp</strong>>\app rd /S /Q testupgrade
cd .. tns create testupgrade rm -rf <<strong>yourapp</strong>>/app/tns_modules mv testupgrade/app/tns_modules <<strong>yourapp</strong>>/app rm -rf testupgrade
Last piece, If you are using my awesomely cool LiveSync code; you have one more step you need to do; unfortunately Telerik has not yet accepting my patch into the android platform. So I have pulled the same 1.1.0 platform source code as they released then added my patch and again compiled it for your usage (if you wish to compile it yourself; the readme file in the LiveSync project explains how.) The pre-compiled runtimes can be pulled from http://www.master-technology.com/tns-android-1.1.0.tgz
After downloading and moving this file into your main project app directory (i.e. where the watcher.js file lives); The steps are as follows (Oh you will need to make sure to copy your androidmanifest.xml file from the platform/android folder if you have made **any** changes to it that you want to keep as this will install a new copy):
tns platform remove android tns platform add android --frameworkPath=.\tns-android-1.1.0.tgz cd app npm install nativescript-livesync@latest --save copy /y node_modules\nativescript-livesync\support\watcher.js ..
tns platform remove android tns platform add android --frameworkPath=./tns-android-1.1.0.tgz cd app npm install nativescript-livesync@latest --save cp node_modules/nativescript-livesync/support/watcher.js ..
And you will be done. LiveSync will continue to work and you will be fully on the 1.1.0 Release!