John
John

Reputation: 163

Cocoa/Cocoa.h file not found

I am using XMPPFramework in my application. I have imported the Cocoa/Cocoa.h in my .m file. But when i build the project Xcode shows an error.

error: "Cocoa/Cocoa.h file not found".

How can i solve this Error?

Upvotes: 7

Views: 22646

Answers (3)

user2289379
user2289379

Reputation:

put #import "Cocoa/Cocoa.h" or #import <Cocoa/Cocoa.h> in your .m file

And Alos i don't like Copy and Paste , so please refer this Question/Answer
Cocoa/Cocoa.h Not Found (Error)
It is similar to your Question.

Upvotes: 1

Sandeep Sachan
Sandeep Sachan

Reputation: 373

Add this line :

 #import <Foundation/Foundation.h>

remove this :

 #import <Cocoa/Cocoa.h>

Upvotes: 4

bdash
bdash

Reputation: 18308

If you're building for iOS then you shouldn't #import <Cocoa/Cocoa.h>. That header only exists on OS X. For iOS you need to include the various framework headers directly (e.g., #import <UIKit/UIKit.h>).

Upvotes: 12

Related Questions