error TS2339: Property 'getter' does not exist on type 'typeof ios'. in Nativescript 6 with angular
Asked Answered
B

1

5

Upgrade to latest version of Nativescript 6 from version 5 code start giving error of getter of ios in utils. Property 'getter' does not exist on type 'typeof ios'. in Nativescript 6 with angular. This code is responsible for close keyboard at IOS.

Checked over official Docs not method is available https://docs.nativescript.org/core-concepts/utils#ios

Also tried getting error after run by Object property access utils.ios.getter() is deprecated; use the respective native property instead utils.ios['getter'](UIApplication, UIApplication.sharedApplication)

utils.ios.getter(UIApplication, UIApplication.sharedApplication)
        .keyWindow
        .endEditing(true);

Getter should be available in ios utils

Beeswax answered 7/7, 2019 at 1:6 Comment(0)
H
16

utils.ios.getter(...) was already deprecated on {N} v5.4, probably it's removed in v6. You should directly access the property moving forward.

UIApplication.sharedApplication.keyWindow.endEditing(true);
Hesiod answered 7/7, 2019 at 12:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.