IOS SDK crashes after reinstalling UIKit databases and Foundation not found

For the pch file, I get the following 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 is the default file.

 // // 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 the xcode and iOS SDK, but this did not fix the problem. This problem occurred after adding the iAd infrastructure to one of my projects, but all my projects will not compile.

I am using the latest version of the SDK (4.1).

The project has a framework. For some reason, when I try to add a new structure, it lists OSX in an iOS project.

Thanks for any help.

+3
source share
6 answers

In the Apple Developer Forums, I was able to get help reporting a problem. It turns out that somehow the build parameter was set to something strange.

This was the option "Database Search Paths". Make sure it is empty if anyone has a similar problem.

+13
source

I would like to add to Matthew's answer:

In fact, Framework search paths should not be empty, but should contain only paths to the Frameworks SDK folders. In my case, the simulator worked with this path:

 /Applications/Xcode.app/Contents/Developer/Platforms/_**iPhoneSimulator.platform**_/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/ 

and the device started working when I added this:

 /Applications/Xcode.app/Contents/Developer/Platforms/_**iPhoneOS.platform**_/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/ 

Thi for Xcode Version 4.5.1 (4G1004).

+5
source

This happened to me in xcode 4, it will be perfectly created for debugging, but not for release. Like your fix, the prefix header for the release pointed to UIKit.h instead of my .pch file.

0
source

It happened to me. I'm not very good at Mac Finder. It does not work just like Windows Explorer. I wanted to add several image files to my project and go to the folder that I accidentally double-clicked on the developer folder, which added more than 8500 files for my project. Thinking that it was enough just to delete the folder from my project, I did not know that this would change the search paths. This happened, and in fact it also changed my search path in the library. Removed both. But not to strong emotional agony.

I add this only so that people know how the problem arose for me. Something like this is insidiously easy.

0
source

got this problem with xcode 5 (developer preview). I tried everything including these answers - Availability.h, UIKit.h, etc. not found but nothing works.

my fix reinstalled xcode (downloading again from the developer portal and replacing the old one)

0
source

Make sure this is not a typo. I had several dependencies on UIKit spelling errors with a capital letter, I like this:

 #import <UIKit/UIKIt.h> // typo #import <UIKit/UIKit.h> // correct 

Just carefully check the import and make sure.

0
source

Source: https://habr.com/ru/post/908988/


All Articles