Skip to content

VSCode debugger crashes on old simulators #1084

Closed
@DimitarTachev

Description

@DimitarTachev

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: 5.2.0
  • Cross-platform modules: 5.2.0
  • iOS Runtime: 5.2.0

Describe the bug

To Reproduce

  1. tns create jsApp --js && cd jsApp && code .
  2. Replace your onTap method with the one below:
viewModel.onTap = (args) => {
    const btn = args.object;
    const native = btn.nativeView;
    console.log(native);
};
  1. Set a breakpoint inside the above-mentioned method.
  2. Start an old simulator (<11.0) e.g. with iPhone 6 with iOS 9.3.
  3. Click Launch on iOS from VSCode.
  4. Try to inspect the nativeView of the button.
  5. You will get [UIButton adjustsImageSizeForAccessibilityContentSizeCategory]: unrecognized selector sent to instance exception and the app will crash (this property is introduced in iOS 11).

Expected behavior
The iOS runtime should not return properties for newer iOS version through the debug protocol. In this case the returned properties should be for iOS <=9.3.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions