Skip to content

Unrecognized selector sent to instance in iOS14 beta #69

Closed
@eriese

Description

@eriese

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) [email protected]
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions