Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add UIKit to an Xcode project?

Tags:

xcode

uikit

I've imported another programmer's project into Xcode and get the error "UIKit/UIKit.h file not found." I tried right clicking the Frameworks folder but didn't see a way to add it. How can I add the UIKit to this project?

like image 267
MonkeyBusiness Avatar asked Aug 14 '11 09:08

MonkeyBusiness


People also ask

How do I import UIKit?

To import the UIKit: Navigate to Site Studio > Sync packages > Import packages.

What is UIKit in Xcode?

UIKit manages your app's interactions with the system and provides classes for you to manage your app's data and resources. App and environment. Manage life-cycle events and your app's UI scenes, and get information about traits and the environment in which your app runs. Documents, data, and pasteboard.


2 Answers

Check that you are using a iOS project and not a Mac OSX one - UIKit is only for the iPhone/iPad

like image 65
mmmmmm Avatar answered Sep 28 '22 03:09

mmmmmm


Navigate to the target and go to Build Phases and add UIKit to Link Binary With Libraries.

From the Comments to this post:

MonkeyBusiness: Sorry to waste your time. I had set the project up as MacOS rather than iOS. I'm new to Apple and iOS as you can see.

like image 43
dasdom Avatar answered Sep 28 '22 01:09

dasdom