Import a third-party structure into the Swift Cocoa Touch Framework

I searched everywhere and tried everything, but I can't get it to work. I am trying to create a Cocoa Touch Framework (in Swift) to share code between the iOS application I am developing and its extension. All common code is based on NMSSH . I added the NMSSH framework to my framework, making sure it appeared in "Link Binary with Libraries" and that it aimed at my framework. However, when I add #import <NMSSH/NMSSH.h> to the umbrella header, I get the Include of non-modular header inside framework module 'MyFramework' error message.

In most places that I looked through, they say the fix is ​​to import a third-party structure in the .m file in my structure. The problem is that my framework is in Swift and therefore does not have any .m files. I tried adding import NMSSH to my .swift file, but that just leads to No such module 'NMSSH' .

There must be a way to make this work without rewriting all my code in Objective-C.

+5
source share

Source: https://habr.com/ru/post/1206444/


All Articles