Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 252
ki15686 Avatar asked Dec 09 '22 06:12

ki15686


2 Answers

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

like image 101
XmasRights Avatar answered Dec 11 '22 09:12

XmasRights


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.

like image 40
barksten Avatar answered Dec 11 '22 11:12

barksten