How to insert Swift code into Objective C project

I am trying to insert a Swift class into an objective C project.


Per the documentation, I have set the Defines Modules Build Setting to Yes.


In my objective C .h file where I want to access the Swift class, I have made the following insertion:

#import “StraightLineDepreciation-Swift.h”

and Xcode 9 says that  “StraightLineDepreciation-Swift.h” is not found.

This is the same a the objjective c interfae header file name.


I think that the above should work, but it does not.


Thanks in advance.


Mark Schapira

Powered by WPeMatico


You may also like...

Comments are closed.