I downloaded the BlueTooth Low Energy (BLE) Heart Rate Example code (see: http://developer.apple.com/library/mac/#samplecode/HeartRateMonitor/Listings/ReadMe_txt.html if interested) and built it with XCode 4.6 on Mtn Lion MacBook Air. I get the following error:
Documents/HeartRateMonitor/HeartRateMonitor/HeartRateMonitor-Prefix.pch:6:13: fatal error: ‘Cocoa/Cocoa.h’ file not found
#import
I have tried various things such as getting rid of the precompiled header file, changing some settings, but nothing has worked. I’m new to the Apple world; I’ve done limited iOS stuff with XCode but no Mac programming. I have done some research and tried to follow the advice here for example:
Compile, Build or Archive problems with Xcode 4 (and dependencies)
Is it OK to remove Prefix.pch file from the Xcode project?
Note that the original example states it is for XCode 4.2 or later.
I had this problem for the same exact project. Download the command line tools package from the apple dev site and your good to go.
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-