Skip to content
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 opened this issue Feb 20, 2020 · 2 comments
Closed

Adding native code for ios doesn't work #144

heilerich opened this issue Feb 20, 2020 · 2 comments

Comments

@heilerich
Copy link

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.

@vallemar
Copy link

I have tried the example that you put and it does not work for me either, this is critical, right? We need to access this functionality, also, could someone tell me a site that explains 100 how to use swift with Nativescript? Thank you!

@nativescript-vue-bot
Copy link
Collaborator

We are locking this issue because it has been closed for more than 14 days.

If the issue comes up again please open a new issue with additional details.

@nativescript-vue nativescript-vue locked as resolved and limited conversation to collaborators Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants