swiftnmssh

NMSSH file not found


My goal is to create ssh connection between my iPhone and my raspberry pi. I installed this framework by using pods. That was successful, but here comes the problem. https://github.com/NMSSH/NMSSH

This page writes the following: Add #import NMSSH/NMSSH.h> to your source file.

But what is my souce file? Where should I place this import?

I can insert it into a swift file and when I placed it into an an objective-c file, I got NMSSH/NMSSH.h file not found.

What is the solution?

Thanks


Solution

  • If you are working inside a Swift project, you need to put that import statement into an objective-c bridging header file.
    Check out Apple's documentation on bridging headers.

    Also, you need to write the equivalent Swift code, instead of the code examples on the Github page.