Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

3 How to consume static libraries

Carlos Manias Díez edited this page Jan 24, 2014 · 1 revision

In order to consume the static library in a project you need to add both the .a binary file and the header files to your project.

Right click on the project where you want to add the library, and select Add files to "". You can add the library to a folder like "ExternalLibraries".

Select your project and then your target, and go to the Build phases tab.

Add the library on the "Link Binary With Libraries phase".

Next step is to add the library headers to your project. To accomplish that you ned to specify the path where Xcode will search for the library header files.

On the Build Settings tab, go to Search Paths and add the path in the Header Search Paths setting.

For more information you can refer to https://developer.apple.com/library/ios/technotes/iOSStaticLibraries/iOSStaticLibraries.pdf