Skip to content

[Feature Request] Provide ability to specify native class name when using TS extend #756

@PeterStaev

Description

@PeterStaev

Currently when using the pure-JS extend method, you have ability to specify the name of the Obj-C class that will be created. For the TS extend version this is limited and the current logic always pulls the name of the constructor function. This creates problems when uglify/mangling is used and currently all such classes are excluded from mangling here.

Two possible solutions:

  1. Have a static property (ObjCClassName) that will be used, if present, as the name of the native class.
  2. Evaluate and use the name property of the JS class. Although this is readonly it can be overridden with Object.defineProperty(Foo, "name", { value: "Bar" })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions