I use XMPPFrameworkin my application. I imported Cocoa / Cocoa.h into my .m file. But when I build a project, it Xcodeshows an error.
XMPPFramework
Xcode
error: "Cocoa / Cocoa.h file not found."
How can I solve this error?
If you are creating iOS, you should not #import <Cocoa/Cocoa.h>. This header exists only in OS X. For iOS, you need to directly include various frame headers (for example, #import <UIKit/UIKit.h>).
#import <Cocoa/Cocoa.h>
#import <UIKit/UIKit.h>
Add this line:
#import <Foundation/Foundation.h>
delete this:
#import "Cocoa/Cocoa.h" #import <Cocoa/Cocoa.h> .m
#import "Cocoa/Cocoa.h"
And Alos I don’t like Copy and Paste , so please refer to this Question / Answer Cocoa / Cocoa.h Not found (error)This seems to be your question.