Search code examples
iphoneobjective-ciosios4iad

iOS SDK broken ever after reinstall UIKit and Foundation frameworks not found


For the pch file I get these errors:

/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:6:34: error: Foundation/Foundation.h: No such file or directory

/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:7:24: error: UIKit/UIKit.h: No such file or directory

Here's the file as it is by default:

//
// Prefix header for all source files of the 'iPhone Monkey Curling' target in the 'iPhone Monkey Curling' project
//

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif

I reinstalled Xcode and the iOS SDK but that did not fix the problem. This problem occurred after adding the iAd framework to one of my projects but all of my projects won't compile.

I'm using the latest SDK (4.1).

The frameworks are there in the project. For some reason, when I try to add a new framework, it lists the OS X ones in an iOS project.

Thank you for any help.


Solution

  • On the Apple developer forums I managed to get help on pin-pointing the issue. It turns out somehow a build option was set to something odd.

    It was the "Framework Search Paths" option. Make sure this is empty if anyone has a similar problem.