UIKit.h not found error

强颜欢笑 提交于 2019-12-12 12:46:58

问题


I made a single view app for the ipad, with a movie, webview and button, and I get this error when I try and run it. I have restarted the application, and reinstalled it, but nothing is working. This error keeps coming up in my MoviePlayer_Prefix.pch file. Can someone help me out?


回答1:


It sounds like you removed the UIKit.framework from your project at some point. Check if it is listed in your project navigator. If it's not there, go to your project in the project navigator pane, select your target, go to the build phases tab, click on link binary with libraries, hit the plus button, find the UIKit.framework there and add it to your project.

EDIT: This answer suggests that there mayb be an issue with your framework search paths build setting. Check that out and if the path is empty and it still doesn't work, a re-install of Xcode would fix it, I think.




回答2:


Just wanted to add my two cents on not making a dumb-ass mistake - came across this answer hoping to solve same problem.

Turns out I had written #import "<UIKit/UIKit.h>" instead of #import <UIKit/UIKit.h>.

Thought I would add in case someone else makes a simple mistake like me.



来源:https://stackoverflow.com/questions/10658453/uikit-h-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!