简体   繁体   中英

Xcode how to add a static library project in another project?

i have an 2 XCode iphone projects. 1 creates a static library. i want to use that static library in my other project.

how to attach that static library project with my other project. so that when i compile my other project it will automatically compile the static library project and use that library.

how to do this ?

It's quite simple :

First you need to drag the static library project file (xcodeproj) into your project to make a cross-project reference.

Then you need to add the static library target as a dependency of your application app : go into the "Link Binary With Libraries" build phase of your application target and drag the static library target into it.

You can find an example of this process with the GData API : http://code.google.com/p/gdata-objectivec-client/wiki/BuildingTheLibrary

(under the "Linking to the iPhone Static Library" section)

Hope this helps, Vincent.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM