I have downloaded an iOS project and would like to know how to import this into my app in xcode 4.3. Do I have to copy over every single .h and .m file into my project? or can I just import it as a library type thing. And if so, how?
-
possible duplicate of [How to "add existing frameworks" in Xcode 4?](http://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4) – jww Jul 03 '14 at 05:34
2 Answers
The easiest way is just downloading the whole project, and copy the whole folder in your project (drag and drop in your project navigator)
Then, you add the .h in the class you want to use and thats all!

- 20,382
- 3
- 43
- 62
-
3Oh wow. I had no idea it was so easy. They make everything else so complicated. Hah! Thanks! – Jesse Durham Apr 10 '12 at 14:23
-
This really depends on the library or component in question. Most open source projects provide some sort of documentation or guidelines that guide you through a suggested inclusion scenario. Cocoa-Touch-Barcodes is one of the few exceptions that don't give you any hints.
In general you have several options for a library like Cocoa-Touch-Barcodes, two of the more convenient ones being:
- Create a workspace and add the library to it (see this tutorial for details).
- Nest the project inside of your existing project and set it up as a dependency (see the three20 guide, the "Manually add Three20 to your project" section too see and example - for Cocoa-Touch-Barcodes it's even simpler as you don't have several projects and bundles).
In theory, the first approach is better and considered the modern way of doing things, but unfortunately there still seem to be some Xcode related quirks here. For the time being I would still recommend doing the second approach.

- 6,152
- 1
- 36
- 36