Skip to content

Unrecognized selector sent to instance in iOS14 beta #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eriese opened this issue Jul 15, 2020 · 5 comments · Fixed by #76
Closed

Unrecognized selector sent to instance in iOS14 beta #69

eriese opened this issue Jul 15, 2020 · 5 comments · Fixed by #76

Comments

@eriese
Copy link

eriese commented Jul 15, 2020

Which platform(s) does your issue occur on?

  • iOS/Android/Both: iOS
  • iOS/Android versions: iOS14
  • emulator or device. What type of device? both. any devices running iOS14

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

  • CLI: (run tns --version to fetch it) 6.7.8
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project) 6.5.10
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project) iOS@6.5.2
  • Plugin(s): (look for the version numbers in the package.json file of your
    project and paste your dependencies and devDependencies here)
"dependencies": {
    "@nativescript/theme": "~2.3.0",
    "nativescript-datetimepicker": "^1.2.2",
    "tns-core-modules": "~6.5.0"
  },
  "devDependencies": {
    "nativescript-dev-webpack": "~1.5.0"
  },

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:

nativePicker.setValueForKey(color.ios, "textColor");
nativePicker.setValueForKey(false, "highlightsToday");

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
Copy link

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

@SergeyMell
Copy link

Same issue for me on iOS 14 released

@JCFowler
Copy link

Also have this issue.

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

@SergeyMell
Copy link

The solution from this thread helped me.

@asharghi
Copy link

A PR is submitted to fix this NativeScript/NativeScript#8876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants