Another day, another great release of NativeScript! Version 3.2 is out in the wild (a.k.a. npm). Be sure to update with npm install -g nativescript to get the latest bits.



Here are the highlights for this release:

Support for Xcode9 and iOS 11

iOS 11 (and maybe a new iPhone 8?) are on the horizon! It’s gonna be hot, and it's soon going to be on every iOS device. But more importantly - you will be able to run NativeScript apps on it. In fact, you can even try it today as with the 3.2 release we officially support Xcode 9 and iOS 11.



Along these lines, there are a few more improvements we made to the NativeScript CLI related to the build process. The build output is now much less verbose - printing the relevant information and reducing the clutter. We are also utilizing the allowProvisioningUpdates option of Xcode that will auto-create team managed provisioning profiles when team-id is provided.





Web Workers with Webpack

Next up, you can now use web workers when building with webpack! You can use the nativescript-worker-loader to require web worker scripts when building webpack. The loader should be used along with the NativeScriptWorkerPlugin. Refer to the nativescript-worker-loader readme for detailed instruction on how to setup and use it.



Numerous Bug Fixes

We have fixed 50+ bugs and issues since the 3.1.0 release! Here are some honorable mentions:



Fixed “iOS Archive Export unexpected behaviour when using AdHoc or AppStore provisioning” #3020 (thanks Peter Staev!);

Android views are cached by default when navigating forward. This feature should bring performance improvements especially when navigating back in Android;



Blur and Focus events added (thanks Eddy!);



V8 GC fixes related to Vue integration;

Several bug fixes in the setup scripts making them more reliable in different cases and environments;



Many other stability fixes related to the NativeScript Core Modules and CLI.

New Experimental GC Mode for Android

If you have read Panayot Cankov's blog post on performance you might remember the MarkReachableObjects() routine that is triggered during the V8 GC pass and how it may take more than 0.5 seconds to complete (even up to 1 second in Angular). Basically what it does is makes sure that Java instances are not prematurely collected by Java GC while they are still needed on the JavaScript side. We noticed that this is rarely needed - only in the cases in which there is no other reference to the Java instance and the scope is the only thing that should keep the reference alive. In fact the code inside tns-core-modules is written in such way that it does not depend on the scope to keep the reference those Java instances.



We have introduced a flag that you can set to disable MarkReachableObjects. All you have to do is add the following in your app/package.json



{ "android": { "markingMode": "none" } }

Note this flag is highly experimental. Although we have tested it with quite a few apps and we are quite confident that it doesn’t cause problems with tns-core-modules it might cause unexpected crashes because of some application code or a plugin you are using.





Share Your Feedback So what is the best approach? You can try to enable it and see if you experience the performance benefits or any unexpected behaviour or crashes. You can read more in depth on the topic (including some performance measurements) here We hope you enjoy the new release and please, if you run into any issues, let us know on our Github issues page! In the meantime, be sure to check out the NativeScript roadmap as we will be updating that soon to show off what is coming in the next couple of releases. Happy NativeScripting!





