2

I create I wanted to create a plugin to create a tcp socket connection in Nativescript (there is not yet an online plugin that does this, only web sockets). Following this guide, I created a plugin and inserted the SwiftSocket library (in Swift) into the PodFile. Once imported and added to the project in NativeScript (Angular), I get an error:

ERROR Error: Could not find module 'nativescript-socket-tcp".

How can I solve the problem? Can i use Swift library in Nativescript?

  • You will be able to use a Swift libraries only if the conditions mentioned here are met - https://docs.nativescript.org/plugins/Use-Native-iOS-Libraries#apis-written-in-swift – Manoj Nov 06 '18 at 15:08
  • The actual error you have posted seems related to loading the module, do you have a public repo? – Manoj Nov 06 '18 at 15:09
  • Hey OP, did you ever get around to launching your `nativescript-socket-tcp` ? – Pixxl Dec 15 '18 at 22:55

0 Answers0