开发者

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 t开发者_如何学编程o 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜