NativeScript v6.0.0 Release Notes

Release Date: 2019-06-28 // almost 5 years ago
  • ๐Ÿ› Bug Fixes

    • bundle: support for file qualifiers with webpack (#7386) (9fcc1dd)
    • bundle: code-only typescript custom components with webpack (#7321) (9fcc1dd)
    • bundle: component builder support for codeFile / cssFile / import with webpack (#7324) (9fcc1dd)
    • bundle: different event order (NativeScript/nativescript-cli#4633) (8851835)
    • โช restore TextField.textChange and Switch.checkedChange event syntax in xml (#7403) (76b5089)
    • android: ignore gzip content-encoding for status code 204 (#7417) (4437cd6)
    • android-transition: exit transition not executed after app suspend resume (#7402) (f08b491)
    • css-state: _appliedSelectorsVersion assignment (#7405) (9ecf07f)
    • observable-array: splice to notify correct amount of added items (#7426) (5e14de6)
    • cancel contradictory gesture events (#7296) (b8a82f2)
    • ๐Ÿ‘ allow span descendants in FormattedString (#7369) (01c4b8c)

    ๐Ÿ”‹ Features

    • bundle: bundle workflow support (#7320) (ecd9fc3)
    • android: androidX support (#7039) (c5db112)
    • BETA/EXPERIMENTAL: bottom navigation and tabs components (#6967) (0c2c1cc)
    • โž• add support for :focus pseudo class in TextField / TextView (#7396) (0bfddab)
    • animation: support animating width/height properties (#5147) (e7c575)

    ๐Ÿ’ฅ BREAKING CHANGES

    • ๐Ÿšš AndroidApplication.currentContext in tns-core-modules/application module is now removed.

    ๐Ÿ‘‰ Use AndroidApplication.startActivity, AndroidApplication.foregroundActivity, or AndroidApplication.context properties instead.

    • ๐Ÿšš start(...) method in tns-core-modules/application module is now removed.

    ๐Ÿ“„ Use application.run(...) method instead. Check the "Flexible Frame Composition" section in this document that explains the full migration path from application.start(...) to application.run(...) and the implications from this change

    • ๐Ÿ— loadPage(...) method in tns-core-modules/ui/builder module is now removed.

    ๐Ÿ— Use createViewFromEntry(entry: NavigationEntry) method in tns-core-modules/ui/builder module instead.

    • ๐Ÿšš tns-core-modules/ui/core/dependency-observable module is now removed.

    ๐Ÿ’ป Use tns-core-modules/ui/core/properties module instead.

    • ๐Ÿšš ViewBase.showModal(), ViewBase.showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase, and ViewBase.showModal(view: ViewBase, context: any, closeCallback: Function, fullscreen?: boolean, animated?: boolean, stretched?: boolean): ViewBase method overloads are now removed.

    ๐Ÿ‘‰ Use ViewBase.showModal(moduleName: string, modalOptions: ShowModalOptions): ViewBase or ViewBase.showModal(view: ViewBase, modalOptions: ShowModalOptions): ViewBase instead.

    • ๐Ÿšš Frame.androidOptionSelectedEvent and AndroidOptionEventData interfrace in tns-core-modules/ui/frame module are now removed.

    Event not raised by NativeScript core framework anymore.

    • ๐Ÿšš AndroidFrame.cachePagesOnNavigate in tns-core-modules/ui/frame module is now removed.

    Not used internally in NativeScript core framework anymore.

    • ๐Ÿšš stack() method in tns-core-modules/ui/frame module is now removed.

    ๐Ÿ‘‰ Use getFrameById(...) method if you want to retrieve a frame different than the topmost one instead.

    • ๐Ÿšš AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, superFunc: Function) method overload in tns-core-modules/ui/frame module is now removed.

    ๐Ÿ‘‰ Use AndroidActivityCallbacks.onCreate(activity: any, savedInstanceState: any, intent: any, superFunc: Function) instead.

    • ๐Ÿšš WebView.url property in tns-core-modules/ui/web-view module is now removed.

    ๐Ÿ‘‰ Use WebView.src property instead.

    • ๐Ÿšš ios.getter(...) function in tns-core-modules/utils module is now removed.

    ๐Ÿ‘‰ Use the respective native property directly instead.

    • ๐Ÿšš View.observe(...) method in tns-core-modules/ui/core/view module is now removed.

    ๐Ÿ‘‰ Use View.on(...) method instead.

    • The addedCount variable from ObservableArray.splice(...) change event is always the amount of added items.

    Migration steps: ๐Ÿšš The old addedCount can be obtained by const addedCount = event.addedCount - event.removed.length

    • ๐Ÿ›  Fix to cancel contradictory gesture events (e.g. tap and double tap) introduces the following behavior breaking change

    Before:

    • iOS / Android:
      • double tap: child tap -> parent tap -> child double tap -> parent double tap
      • tap: child tap -> parent tap

    After:

    • iOS:
      • double tap: child double tap
      • tap: child tap
    • Android:
      • double tap: child double tap -> parent double tap
      • tap: child tap -> parent tap

    Migration steps: ๐Ÿšš Move event handlers accordingly.