Adding a Swift framework to an OF Project

I’m trying to add AudioKit (a Swift audio framework I’m involved with) to an OF project. I’m able to add the framework by changing the main.m file to, and the ofApp.cpp file to (switching from C++ to Objective-C++ since I’m only working on a Mac).

I have a simple instrument defined in my Swift file (Oscillator.swift). I’m able to access this file through the auto-generated header Xcode made for accessing Swift code, myProjectDebug-Swift.h. If I import that file in, I’m able to successfully create an instance of my oscillator, and hear it on startup. All groovy so far.

HOWEVER, if I do the same thing in, I get build errors as shown below (I’ve attached the relevant files to this post):

Does anyone have any idea why I would be able to access a Swift file in my file, but not the file??

Below is the code in my file that is working fine:

include “ofMain.h”
include “ofApp.h”
include “ofxGui.h”
include “myProjectDebug-Swift.h”


int main( ){

OscillatorInstrument *instrument = [[OscillatorInstrument alloc] init];


And, this is the code in my file that does compile:

include “ofApp.h”
import “myProjectDebug-Swift.h”

void ofApp::setup(){

OscillatorInstrument *instrument = [[OscillatorInstrument alloc] init];


Below are the errors I get at the OscillatorInstrument ... line:

Thank you!!!