NativeScript / nativescript-datetimepicker

Plugin with date and time picking fields
Apache License 2.0
27 stars 26 forks source link

Unrecognized selector sent to instance in iOS14 beta #69

Closed eriese closed 3 years ago

eriese commented 4 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

  1. download sample. unzip and run npm install
  2. download xcode12-beta2 (I think you need to be enrolled in the Apple Developer Program to do this, which sucks)
  3. run DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer tns debug ios in terminal (you may have to open a simulator running iOS14 first)
  4. click on the field to try to open it
  5. see that field does not open a picker
  6. find the following error in the log:
    CONSOLE LOG file:///app/vendor.js:53426:24: DatePickerField Error: Error: -[_UIDatePickerIOSCompactView _setTextColor:]: unrecognized selector sent to instance 0x7fb421412f00

Is there any code involved?

I tracked it down to _applyDialogSpinnersColors here. Both selectors throw the error:

https://github.com/NativeScript/nativescript-datetimepicker/blob/d9a965f98b22774167582544273be7391c4d3dd9/src/datetimepicker.ios.ts#L180-L181 My guess is that since you're accessing private scope in _applyDialogSpinnersColors, they broke it in iOS14 and either another workaround is needed, or at the very least a try/catch

zghotlawala commented 3 years ago

Yup, It is happening. Anyone found workaround or alternate solution?

SergeyMell commented 3 years ago

Same issue for me on iOS 14 released

JCFowler commented 3 years ago

Also have this issue.

So Time picker completely breaks any app thats running on iOS 14?

SergeyMell commented 3 years ago

The solution from this thread helped me.

asharghi commented 3 years ago

A PR is submitted to fix this https://github.com/NativeScript/NativeScript/pull/8876