I have a MacOS project with several targets and in which I have been refactoring Obj-C classes over to Swift 1 by 1. I have been doing this for months and all was fine and building well until the most recent class. The project simply refuses to build.
I see the ProjectName-Swift.h file in the Project folder but the last was build date was last week and obviously does not include the new class, hence Xcode is complaining it can't find the new Swift Class.
Before you answer understand the following:
- This is a very old and longstanding MacOS project with several targets, it is NOT a new MacOS project.
- I have previously added quite a few other Swift classes to this project and built and used them just fine in Obj-C .m files including the one that is complaining it can't see the latest Swift class:
ChartListTableCellView
. - I already tried clean and build about 50 times and removing derived data. Nothing will force a rebuild of the ProjectName-Swift.h and the new class is definitely NOT in there.
- There are no other build issues with this just this one related to not being able to see the class.
- The class was previously implemented in Obj-C and I was porting it over and that old class file is not referenced by the project at the moment.
- This Swift class
ChartListTableCellView
is NOT referenced in the obj.h file so it is not forward referenced there. - The Bridge Header is imported in the .m that is complaining.
The project will not build and does not see the new class. This is how the class is declared so it should be visible:
@objcMembers class ChartListTableCellView : NSView
{
private let grayBottomBorder = NSView()
...
init() {
super.init(frame: NSMakeRect(0, 0, 0, 0))
...
}
...
}
I am stumped and am out of ideas.