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
Description
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
vue init nativescript-vue/vue-cli-template testapp
, select typescript- Add a TestClass.swift with some swift code to App_Resources/iOS/src/
- Create typescript typings with TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" tns build ios
- 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.