Monthly Archives: May 2017

NativeScript: 3.0.1 Released

Normally I don't do a post about a simple point release; however if you are one of the many who upgraded to 3.00; you will really want to grab 3.0.1.

There are lots of issues resolved from the major update 3.0.0; some of them include:

  • Several crashing bugs on Android
  • Image issues
  • Action bar issues on iOS
  • Layout issues on iOS
  • bindingContext issues
  • TextField issues

Upgrading (Core):

First of all to upgrade is done is a couple steps:
> npm install -g nativescript@latest
> npm install tns-core-modules@latest --save

Next try the new update command or you can manually run the commands below
> tns update

For iOS

> tns platform remove ios
> tns platform add ios@latest

Then you can type tns info and verify that everything says 3.0.1, there is no 3.0.1 for Android at this time.

NativeScript: Downgrading to 2.5

If you are needing to use a plugin that hasn't been upgraded to support 3.0 you basically have three choices, and guess what I can help with each of them...

  1. Wait for it to be updated; you can check my site http://plugins.nativescript.rocks; then select the "3.0" plugins list, now you can easily see when a plugin has 3.0 compatibility.
  2. Update it your self; or since I'm a contractor; you pay me; I will upgrade the plugin for you.
  3. Downgrade to NativeScript 2.5; I suspect most of you are the most interested in this since you are here...

The good news is that several of the 3.0 parts are backwards compatible.  You can be running the 3.0 NativeScript command line and build 2.5 apps.  You can also be using the 3.0 release runtimes with the core 2.5. modules.  So here is the way to downgrade a 3.0 app into a 2.5 app.

 

To downgrade PAN (Plain Awesome NativeScript) apps:

npm install tns-core-modules@2.5.2 --save
npm remove nativescript-dev-android-snapshot --save-dev
tns platform clean ios
tns platform clean android

If you are using TypeScript in your apps you need to do:

npm install typescript@2.1.6 --save-dev
npm install nativescript-dev-typescript@0.3.7 --save-dev

To Downgrade NAN (NativeScript ANgular) apps:

npm install --save @angular/animations@~4.0.0
npm install --save @angular/common@~4.0.0
npm install --save @angular/compiler@~4.0.0
npm install --save @angular/core@~4.0.0
npm install --save @angular/forms@~4.0.0
npm install --save @angular/http@~4.0.0
npm install --save @angular/platform-browser@~4.0.0
npm install --save @angular/platform-browser-dynamic@~4.0.0
npm install --save @angular/router@~4.0.0
npm install --save nativescript-angular@~1.5.0
npm install --save reflect-metadata@^0.1.8
npm install --save rxjs@~5.2.0
npm install --save zone.js@~0.8.4
npm install --save tns-core-modules@2.5.2

npm install --save-dev @angular/compiler-cli@~4.0.0
npm install --save-dev babel-traverse@6.15.0
npm install --save-dev babel-types@6.15.0
npm install --save-dev babylon@6.11.2
npm install --save-dev htmlparser2@^3.9.2
npm install --save-dev Lazy@1.0.11
npm install --save-dev typescript@2.1.6
npm install --save-dev nativescript-dev-typescript@0.3.7
npm remove --save-dev nativescript-dev-android-snapshot

tns platform clean ios
tns platform clean android


One note that seems to confuse some people; you can continue to use the NativeScript 3.0 CLI with NativeScript 2.5 applications.  You can also use the 3.0 Runtimes (highly recommended actually) with your 2.5 Core modules applications.

Any of my 2.5 applications are now (This setup is fully 2.5 plugin compatible):
- 3.0 CLI
- 3.0 Runtimes
- 2.5 TNS Core Modules (if NAN, then you need the old Angular stuff as listed above)

And my 3.0 applications are (This is the standard 3.0 setup)
- 3.0 CLI
- 3.0 Runtimes
- 3.0 TNS Core Modules  (if NAN, then you need the new 3.0 compatible Angular Stuff)

 

Plugins.nativescript.rocks upgraded

Behind the scenes PNR (http://plugins.nativescript.rocks) has been upgraded to support several cool new features.

At this moment the largest difference is the backend data storage system has been completely changed; and now has a lot of new data available to it.    This system should allow us to do some more pretty cool things in the future...

By using this new data; I also have a bit more accurate plugin list,    In addition the new system has the ability to track both NativeScript 2.x plugins and separately 3.x.  So on the page you can now see a select list that allows you to change "All" (All plugins), "2.x" plugins that should be only 2.x compatible; and then finally only 3.x compatible.  In addition I took the time to actually drop a physical search bar in the title area; as my virtual search bar seemed to confuse a lot of people.

Play around with it, let me know if you run into any issues.

NativeScript 3.0 Released

Some of you might have seen the all New version 3.0.0 has been released today.  This is a major release.   Lots of things changed under the hood.

Some of the new features

  • Redesigned class system to increase the speed of your app.
  • Better Debugging using Chrome Developer tools
  • Lots of bugs fixed
  • New CSS features

Upgrading (Core):

First of all to upgrade is done is a couple steps:
> npm install -g nativescript@latest
> npm install tns-core-modules@latest --save

Next try the new update command or you can manually run the commands below
> tns update

For Android:
> tns platform remove android
> tns platform add android@latest

For iOS
> tns platform remove ios
> tns platform add ios@latest

Then you can type tns info and verify that everything says 3.0.x

Common Issues:

  1. Plugins fails; this is a known issue do to the complete revamp of the lower levels of the core modules design.  Some plugins need a lot of changes to work in 3.0; so you will have to wait for the third party authors to get caught up.   My plugins site  http://plugins.nativescript.rocks should be listing both version v2 & v3 plugins separately so that you can easily find 3.0 or 2.0 plugins shortly.
  2. TypeScript incompatibilities; you should be using 2.2 or later with v3.0 of TNS