Neal L
Neal L

Reputation: 4339

Adding other git repositories into Xcode project

This may seem like a newbie question, but what is the "proper" way to link other libraries into an Xcode project? For example, suppose you're working on an app and want to use a the asi-http-request library or tapku, which are hosted on Github. I just drop into the terminal, use git clone to get a local copy of the repository, but then what?

Is the right thing to just add the path to the Header Search Paths? Or create a folder in Xcode and drag the directory into the project?

I've reviewed a few SO posts on this, but can't quite decide what the best practice is here.

Thanks!

Upvotes: 1

Views: 2186

Answers (1)

Paul R
Paul R

Reputation: 213200

My preferred method is to add the include and library directories to my project, with the group hierarchy matching the actual file system hierarchy. That way you don't need to mess about with settings for header paths, library paths, etc, and as a bonus you can easily look up stuff in the header files when needed (e.g. via Command-D). As your project grows and you have more third party libraries etc you'll find this method a lot more manageable.

Upvotes: 2

Related Questions