找不到Cocoa / Cocoa.h文件 [英] Cocoa/Cocoa.h file not found
本文介绍了找不到Cocoa / Cocoa.h文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的应用程序中使用 XMPPFramework
。我在.m文件中导入了Cocoa / Cocoa.h。但是当我构建项目时, Xcode
显示错误。
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.
错误:找不到Cocoa / Cocoa.h文件。
error: "Cocoa/Cocoa.h file not found".
我如何解决这个错误?
推荐答案
如果您正在为iOS构建,那么不应该 #import< Cocoa / Cocoa.h>
。该标头仅存在于OS X上。对于iOS,您需要直接包含各种框架标头(例如, #import< UIKit / UIKit.h>
)。
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>
).
这篇关于找不到Cocoa / Cocoa.h文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文