Nativescript: DatePicker on iOS 14

Created on 22 Sep 2020  路  5Comments  路  Source: NativeScript/NativeScript

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.9-rc.0
  • Cross-platform modules: 7.0.3
  • Android Runtime: /
  • iOS Runtime: 7.0.0
  • Plugin(s): None
  • Xcode Version 12.0 (12A7209)

Describe the bug
As soon as we add a DatePicker tag in a NativeScript Angular project, it generates an error at runtime when deployed on an iOS 14 simulator.

The error is :

***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught Error: -[_UIDatePickerIOSCompactView _textColor]: unrecognized selector sent to instance 0x7fa7cbc13cc0
at
[color:getDefault](file: node_modules/@nativescript/core/ui/date-picker/index.ios.js:61:0)
at applyAllNativeSetters(file: node_modules/@nativescript/core/ui/core/properties/index.js:1091:0)
at initNativeView(file: node_modules/@nativescript/core/ui/core/properties/index.js:1021:0)
at onResumeNativeUpdates(file: node_modules/@nativescript/core/ui/core/view-base/index.js:695:22)
at _resumeNativeUpdates(file: node_modules/@nativescript/core/ui/core/view-base/index.js:259:0)
at onLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:214:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at callFunctionWithSuper(file: node_modules/@nativescript/core/ui/core/view-base/index.js:291:0)
at callLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at loadView(file: node_modules/@nativescript/core/ui/core/view-base/index.js:437:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:216:0)
at eachChildView(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
at onLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:215:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at callFunctionWithSuper(file: node_modules/@nativescript/core/ui/core/view-base/index.js:291:0)
at callLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:297

To Reproduce

  • create a new Angular project
    tns create HelloWorld --template @nativescript/template-blank-ng
  • add a DatePicker tag in the generated home.component.html file
    <DatePicker row="1"></DatePicker>
  • run the project on an iOS device
    tns run ios

Expected behavior
No crash and the DatePicker correctly rendered.

Most helpful comment

This is now published in 7.0.4

All 5 comments

I have added a PR for this bug @marcjordant https://github.com/NativeScript/NativeScript/pull/8877

@NathanWalker you can close this as well

Thanks @asharghi we'll be releasing a new core patch shortly with your pr's and will close this - thank you again for those pr's 馃

This is now published in 7.0.4

Was this page helpful?
0 / 5 - 0 ratings