ki15686
ki15686

Reputation: 41

Can not find <coreaudiokit/coreaudiokit.h> in ios8 xcode6

I am trying to get the MIDI over BLE working as discussed at session 501 at the WWDC 2014.

I get an error "file not found" when trying to #import CoreAudioKit/CoreAudioKit.h framework

I have included the framework in the build menu and tried putting the #import line in the .h or .m ViewController file.

It recognizes and compiles CoreBluetooth/CoreBluetooth.h with no problems.

This is a brand new installation of Xcode 6 downloaded yesterday (13 Sept 2014)

I feel like Apple has not turned on the switch for CoreAudioKit for iOS.

Any guidance on what I am doing wrong would be most gratefully received.

Thank you, Ken

Upvotes: 4

Views: 976

Answers (2)

barksten
barksten

Reputation: 588

I you want to use the simulator for some other tests (not related to midi over bluetooth) you can use a conditional import of the framework:

#ifdef __APPLE__
#include "TargetConditionals.h"

#if TARGET_IPHONE_SIMULATOR
@compatibility_alias CABTMIDICentralViewController UIViewController;
#elif TARGET_OS_IPHONE
#import <CoreAudioKit/CoreAudioKit.h>

#endif
#endif

You still have to do optional linking of the framework in your build settings since CireAudioKit is not available at all on the simulator (OS X) platform.

Upvotes: 4

XmasRights
XmasRights

Reputation: 1509

CoreAudioKit is not compatible with the iOS Simulator. Run it on a device, and it should build just fine

Upvotes: 10

Related Questions