How to import a project or library into an ios application in xcode 4.3

I downloaded an iOS project and would like to know how to import it into my application in xcode 4.3. Do I need to copy all .h and .m files to my project? or I can just import it as a library type item. And if so, how?

+6
source share
2 answers

The easiest way is to simply download the entire project and copy the entire folder to your project (drag and drop into your project navigator)

Then you add .h to the class you want to use, and all that!

+13
source

It really depends on the library or component in question. Most open source projects provide some kind of documentation or recommendations that will help you in the proposed inclusion scenario. Cocoa -Touch-Barcodes is one of the few exceptions that do not give you any advice.

In general, you have several options for a library such as Cocoa -Touch-Barcodes, two of the most convenient:

  • Create a workspace and add a library to it (see this tutorial for more details).
  • A project socket inside an existing project and configure it as a dependency (see the three20 manual , “Manually add three20 to your project” also see an example - for Cocoa -Touch-Barcodes this is even simpler because you do not have several projects and packages).

In theory, the first approach is better and is considered a modern way of doing something, but unfortunately there seem to be some quirks related to Xcode. Currently, I still recommend a second approach.

0
source

Source: https://habr.com/ru/post/912854/


All Articles