NativeScript

⚡ Empowering JavaScript with native platform APIs. ✨ Best of all worlds (TypeScript, Swift, Objective C, Kotlin, Java). Use what you love ❤️ Angular, Capacitor, Ionic, React, Solid, Svelte, Vue with: iOS (UIKit, SwiftUI), Android (View, Jetpack Compose), Dart (Flutter) and you name it compatible.

MIT License

Downloads
145K
Stars
23.7K
Committers
260

Bot releases are hidden (Show)

NativeScript - @nativescript/[email protected] Latest Release

Published by NathanWalker 6 months ago

Bug Fixes

  • android: ListView tap handling after setting children as focusable (#10522) (03268cc)
NativeScript - @nativescript/[email protected]

Published by NathanWalker 6 months ago

Bug Fixes

NativeScript - @nativescript/[email protected]

Published by NathanWalker 7 months ago

Bug Fixes

  • android: crash on writeText on Android > 29 (#10466) (02e2801)
  • android: getInputStream around "content://" paths (#10469) (41759c1)
  • android: prevent errors on filesystem operations while using "content://" uris (#10461) (c15820b)
  • android: sustain native error stack (#10467) (b226066)
  • color: setAlpha and other methods return proper Color class (#10441) (4f12fee)
  • core: profile decorator (#10476) (135d37b)
  • inspector_modules (ae62725)
  • ios: live-sync handling for plain js/ts apps (#10500) (7370912)
  • ios: unset cached frame before updating origin point (#10499) (3a486e5)

Features

  • android: devtools for elements & network requests (#10506) (5324e50)
  • android: expanded layout constructors so they can be instantiated within android layouts(#10444) (ca886b9)
  • ios: allow custom navigationBar and toolbar on frame (#10495) (d67d297)
  • ios: allow disabling text animations (#10505) (9ca4902)
  • SegmentedBar: selectedTextColor added and selectedBackgroundColor improvements (#10474) (3a0afdb)
  • types-ios: add interop type for stringFromCString (#10494) (0c8c945)
  • visionos: ui-mobile-base supporting xros plus improvements to window handling (#10478) (01d537b)
  • wepback: custom buildPathsupport (#10477) (4293284)

Performance Improvements

NativeScript - @nativescript/[email protected]

Published by NathanWalker 10 months ago

Bug Fixes

  • android: proper change of input interaction mode programmatically (#10434) (07d2129)
  • android: use nativeTextViewProtected in TextField (#10450) (c5561d6)
  • core: inheritable property changes backstack propagation (#10438) (48b1856)
  • core: safe important check (#10455) (172d346)
  • css: box-shadow none handling (#10445) (6744009)
  • ios: font variation settings not applied to labels (#10429) (2cf166d)
  • ios: non-uniform border angle (#10437) (aba3093)
  • ios: ScrollView with listeners removed scroll delegate (#10432) (9fae9c4)
  • ios: shadow does not consider z-index (#10433) (5a4bb7c)
  • time-picker: properly handle 0 on hour and minutes with valueChanged (#10460) (4762699)

Features

  • core: initRootView event (#10442) (82e9c67)
  • core: new defaultVisualState property option to override 'normal' default visualState (#10440) (31ed40c)
NativeScript - @nativescript/[email protected]

Published by NathanWalker 12 months ago

Bug Fixes

  • android: prevent rehydration on destroyed dialogs (#10414) (7563549)
  • core: box-shadow 'none' handling (#10405) (c23695c)
  • core: font variation settings parser invalid axis (#10427) (0847855)
  • core: page frame reference not unset on native view disposal (#10417) (22c21b7)
  • css: prevent shorthand parse error on 'unset' and 'inset' (#10424) (d70b48b)
  • ios: add/remove shadow for reusable views (#10409) (ee87b52)
  • ios: property mask on 'undefined' during view disposal (#10404) (212d086)
  • ios: shadow position after translate transform (#10413) (c78ea79)

Features

  • android: allow shared element transitions to work with ListView/CollectionView/Pager (#10411) (e8c093d)
NativeScript - @nativescript/[email protected]

Published by NathanWalker about 1 year ago

Bug Fixes

  • android: Utils.dismissKeyboard() not working with modal (#10375) (6d44c2d)
  • android: outline path is only supported on api >=33 (#10389) (ff66b1b)
  • class name typo (#10364) (f5f4666)
  • core: Scroll listener register failure after unregister (#10368) (e4fe276)
  • css: prevent duplicate system classes (#10355) (74e6814)
  • ios: Shadow layer origin point update (#10376) (f54ebbb)
  • testing: e2e flag no longer needed, testID is now applicable in dev or prod builds (#10396) (0a2b220)
  • webpack: handle single appComponents env flag (#10401) (0b5393d)
  • webpack: set keep_quoted_props: true in TerserOptions (#10382) (2cb26c2)
  • webpack: force experimentalDecorators on NativeClass (#10356) (0efb84f)

Features

Performance Improvements

  • android: batch setupAccessibleView calls to improve TTI (#10391) (a4bfbda)
  • core: cache default view paddings on android (#10390) (6f599fe)
NativeScript - @nativescript/[email protected]

Published by rigor789 about 1 year ago

NativeScript - @nativescript/[email protected]

Published by NathanWalker about 1 year ago

Bug Fixes

  • application: explicitly pass rootView to initRootView (#10345) (bd8e1b8)
  • application: restore AndroidApplication.on etc. (#10336) (0804934)
  • application: wrap native classes in initialisers (#10335) (5359153), closes #10334
  • core: fix Page event overload resolution (#10347) (2e732ae)
  • datepicker: max, min and date value binding handling (#10343) (6effd55)
NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

  • animation: css keyframes (685d61c)
  • Application: orientation & systemAppearance root classes (7f09b92)
NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

  • android: improve content uri handling (#10316) (77f252e)
  • animation: avoid uncaught reject on cancel (#10309) (622f365)
  • Application: inBackground handling & missing once (#10307) (e430555)
  • ensure Application instance initialized early (#10315) (0401b09)
  • shared-transition: race condition with interactive updates (#10312) (25cc49d)
  • shared-transitions: layer opacity set back to original on next tick (#10310) (0956cb0)
NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

Performance Improvements

NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

  • ios: resilience to nativeView access under edge cases (#10276) (4551da0)

Features

NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

Features

  • ios: new a11y properties for managing font scale (#10260) (7aaa1d8)
  • text: valueFormatter for easy and flexible input auto-formatting (#10264) (b3abc5f)
  • transitions: support zIndex on ios shared elements + support page props on android (#10261) (f4b2722)
NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

Features

Performance Improvements

Breaking Changes

Most projects will be unaffected by these but in an effort to be clear as possible, we will note the following:

  1. Event binding callbacks prefer a properly typed argument:

Potential issue:

error TS2339: Property 'newValue' does not exist on type 'EventData'.

2611       if (e.newValue) {

Possible causes:

Application.on(Application.orientationChangedEvent, (event) => {

Solution:

Application.on(Application.orientationChangedEvent, (event: OrientationChangedEventData) => {
  1. Android labels are vertical align middle by default.

This means that potentially if you were using margins to position, for example on font icon labels, they may appear mis-positioned intially after updating. You should be able to remove custom margin handling to simplify.

  1. Page transitions have improved their API to provide more platform control and introduced a breaking change to the method signatures on iOS. If you had created a custom by extending the Transition class:
  • BEFORE:
animateIOSTransition(containerView: UIView, fromView: UIView, toView: UIView, operation: UINavigationControllerOperation, completion: (finished: boolean) => void): void {
    toView.transform = CGAffineTransformMakeScale(0, 0);
    fromView.transform = CGAffineTransformIdentity;

    switch (operation) {
        case UINavigationControllerOperation.Push:
            containerView.insertSubviewAboveSubview(toView, fromView);
            break;
        case UINavigationControllerOperation.Pop:
            containerView.insertSubviewBelowSubview(toView, fromView);
            break;
    }

    var duration = this.getDuration();
    var curve = this.getCurve();
    UIView.animateWithDurationAnimationsCompletion(
        duration,
        () => {
            UIView.setAnimationCurve(curve);
            toView.transform = CGAffineTransformIdentity;
            fromView.transform = CGAffineTransformMakeScale(0, 0);
        },
        completion
    );
}
  • AFTER:
animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void {
    const toView = toViewCtrl.view;
    const fromView = fromViewCtrl.view;
    toView.transform = CGAffineTransformMakeScale(0, 0);
    fromView.transform = CGAffineTransformIdentity;

    switch (operation) {
        case UINavigationControllerOperation.Push:
            transitionContext.containerView.insertSubviewAboveSubview(toView, fromView);
            break;
        case UINavigationControllerOperation.Pop:
            transitionContext.containerView.insertSubviewBelowSubview(toView, fromView);
            break;
    }

    var duration = this.getDuration();
    var curve = this.getCurve();
    UIView.animateWithDurationAnimationsCompletion(
        duration,
        () => {
            UIView.setAnimationCurve(curve);
            toView.transform = CGAffineTransformIdentity;
            fromView.transform = CGAffineTransformMakeScale(0, 0);
        },
        (finished) => {
            transitionContext.completeTransition(finished);
        }
    );
}

Notes

  • Android WeakRef usage is now standardized and aligned with iOS and latest JavaScript standards to universally use deref instead of the deprecated get API. In 8.4, iOS allowed usage of deref but Android still required get. With 8.5 you can now use deref the same everywhere.
  • If you were using an iterator over an iOS NSArray, always make sure it's using proper platform API, for example:

Incorrect:

// collection: NSArray
for (var i = 0; i < collection.count; i++) {
    const obj = collection[i];

Correct:

// collection: NSArray
for (var i = 0; i < collection.count; i++) {
    const obj = collection.objectAtIndex(i);
NativeScript - @nativescript/[email protected]

Published by rigor789 over 1 year ago

feat(webpack): support tsconfig.app.json when present (https://github.com/NativeScript/NativeScript/commit/ebb827fb8e4cf2ebc82ca66bea386ddc654711f7)

fix(webpack): notify CLI even if there are compilation errors (https://github.com/NativeScript/NativeScript/commit/605998455595a2d35b7f0f73b2cde08c0516361c)

NativeScript - @nativescript/[email protected]

Published by NathanWalker over 1 year ago

Bug Fixes

  • core: allow CoreTypes declarations to be auto generated (#10183) (9f76fea)
  • ios: race condition when setting preferredContentSize on view controller (#10179) (ed14e24)
  • ios: race conditions with nativeView (#10182) (c42c3c5)
NativeScript - @nativescript/[email protected]

Published by NathanWalker almost 2 years ago

Bug Fixes

  • core: ScrollView event wiring sequencing improvement (#10178) (75821ea)
NativeScript - @nativescript/[email protected]

Published by NathanWalker almost 2 years ago

Bug Fixes

  • core: improve loaded/unloaded handling (18b911e)
  • core: improve loaded/unloaded handling to be stable and consistent (#10170) (c9e29aa)
  • ios: embedder usage of window (#10167) (a69a9d6)