Reputation: 531
I developed a simple IOs app to control a Raspberry Pi through SSH using NMSSH few month ago, this app is developped with obj-c and I would like to devellop alost the same in Swift so i import the NMSSH library the same and I follow this to import nmssh with bridging so I can use the library in my swift file but i wan tto compile I have 117 error because xCode see NMSSH file like swift files and not obj-c files and I don't have any idea why or how to solve this. Sorry if that's a simple question but I try to learn Swift and as a french it's not pretty simple with all documentation in Engloish. Thanks.
EDIT:
Upvotes: 2
Views: 5763
Reputation: 9011
First follow the instruction in iOS Developer library about using Swift with Objective-C. Second include:
#import <Foundation/Foundation.h>
and then NMSSH import
#import <NMSSH/NMSSH.h>
in your Bridging header
file
I am new with this framework but it seems like the Foundation contain information/definition of primitive objects.
Also check this answer in more detail: How to call Objective-C code from Swift
Upvotes: 9