rahulg
rahulg

Reputation: 2249

How to add a library project in xcode?

How do I add a third party library project to my Xcode project so that the third party Library header files are accessible to the rest of the file in the main project.

I tried drag and drop; Added target Dependencies; and did 'Link binary with libraries', but still I am not able to include the third party header files. Am I missing out something?

Upvotes: 2

Views: 10028

Answers (2)

vegligi
vegligi

Reputation: 61

first you drag the library to the project directory. and remember to click copy to the project repo when xcode ask.

then you have to add librarys header filer at appDelegate.h. alloc and init the necessary instance...

for all the other viewcontrollers which want to use this library just add #import appDelegate.h and init appdelegate instance, in order to use the library.

Upvotes: -1

LuisCien
LuisCien

Reputation: 6432

Make sure your project can find the headers of your third party library. Check the "Header Search Path", "Library Search Path", and "User Header Search Paths" entries in "Build Settings". Also, set the "Always Search User Paths" key to "Yes".

Hope this helps!

Upvotes: 0

Related Questions