I've got an existing Obj-C project and want to start writing new code for it in Swift.
So I created a new Swift file that I added to the project (and Xcode created a bridging header for me). Now I want to access the class inside the Swift file within my Obj-C code. I've seen this:
and this:
How to import Swift code to Objective-C
and this:
Swift to Objective-C header not created in Xcode 6
And so have tried adding the following line to my Obj-C .m file as described in those references:
#import “NameOfMyProject-Swift.h”
But that gives an error of "Expected FILENAME or ".
The project type is a library, the product name doesn't have space or . characters and the Defines Module setting has been set to YES.
As one is supposed to be able to mix and match Swift and Obj-c in the same project whats wrong with my implementation of this?