Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Adding native code for ios doesn't work #144

Closed
@heilerich

Description

@heilerich

Version

N/A

Reproduction link

https://github.com/heilerich/nsvue-template-issue

Platform and OS info

iOS 13 / Nativescript 6.4.1 / MacOS Catalina

Steps to reproduce

  1. vue init nativescript-vue/vue-cli-template testapp, select typescript
  2. Add a TestClass.swift with some swift code to App_Resources/iOS/src/
  3. Create typescript typings with TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" tns build ios
  4. Try to instantiate the swift class in TypeScript
    Or just clone the minimal reproduction repository.

What is expected?

Matching typescript declarations will be generated for the swift code and the code will be callable from the TypeScript part of the project.

What is actually happening?

The swift class will not be usable in TypeScript code, no objc!nsswiftsupport.d.ts will be generated.


The issue can be solved by updating the "tns-ios" version from "6.0.1" to "6.4.0". Judging from my short tests everything still works as expected after doing this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions