We are incredibly excited to announce the official release of NativeScript 3.0! Since the 3.0 Release Candidate, we've been working hard to fix all major issues and ease the migration path to this new major version of the framework. We closed about 80 pull requests across all repositories and upgraded dozens of plugins and applications to ensure a smooth migration experience for our users. We have also prepared a document to describe the need behind a major version bump and the newly introduced breaking changes.
You can try out the new 3.0 bits by running:
npm install -g nativescript
...and follow our documented upgrade instructions for upgrading individual projects.
Be sure to register to attend the free NativeScript 3.0 webinar (coming up on May 17th!) to learn all about this release and be the first to hear exciting news about our future product plans.
Here is an overview of what's included in NativeScript 3.0:
livesynccommand is removed in favor of
tns runwhich now automatically performs
livesync --watchunder the hood;
plugin find/searchcommand is removed as it had zero usage;
emulatecommand is now deprecated and its functionality has been exposed through the
runcommand and its
run --device <Device Identifier>command now starts an emulator if one is not started already. Prior to 3.0, the
--deviceoption worked only with running devices.
Please note that we decided to wait to release the local snapshot builds feature due to breaking changes in the underlying native build tool chains (i.e. the new Android SDK tools and Xcode 8.3). While the snapshot feature is important for further optimizing the loading time for Android applications, we decided that we shouldn't delay the 3.0 release and will deliver the feature as an incremental update in the near future.
Besides the standard new npm packages update
npm install -g nativescript. If you create a new 3.0 project then all the dependencies will be automatically set to the latest version because the updated 3.0 template will be used. To update an existing project you need to follow these steps:
npm i -S email@example.com
nativescript-angularplugin, again to 3.0.0:
npm i -S firstname.lastname@example.org
npm i -S @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/router@latest npm i -S zone.js@latest npm i -S rxjs@latest
nativescript-dev-typescriptplugin and it will automatically update your TypeScript configuration:
npm i -D nativescript-dev-typescript@latest
For a comprehensive list of all the breaking changes and how to migrate existing code you can refer to this wiki page. And if you are a plugin author we have also prepared this document to guide you through the plugin migration steps for 3.0.
For 3.0 we are turning off the snapshot-by-default feature for Android Angular projects. This is primarily done because for Angular projects the major benefit that affects the loading time is the AoT feature (not present in the existing snapshot architecture) that comes enabled through our nativescript-dev-webpack plugin.
WebPack is the recommended way to optimize your NativeScript Angular applications. Once we ship the local snapshot builds then your applications will be able to take advantage of WebPack, AoT, and snapshots for Android simultaneously. More information about enabling WebPack in a NativeScript application may be found in this documentation article.
We have no less than 600 Jenkins jobs that run continuously to ensure the stability and quality of the framework, but no software is flawless :). Please, let us know of any issue that you may hit with the new release so that we can fix it as soon as possible!
Added more information in the "Enabling the New Bits" section about upgrading existing projects to 3.0.