Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 760
John Avatar asked Apr 05 '13 05:04

John


2 Answers

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>).

like image 57
bdash Avatar answered Sep 21 '22 22:09

bdash


Add this line :

 #import <Foundation/Foundation.h>

remove this :

 #import <Cocoa/Cocoa.h>
like image 45
Sandeep Sachan Avatar answered Sep 21 '22 22:09

Sandeep Sachan