开发者

Create static library in Xcode 4

开发者 https://www.devze.com 2023-04-05 17:03 出处:网络
I can\'t figure out how to create a cocoa touch static library in Xcode 4. I\'ve created static library in Xcode 3 and it worked fine. I used this tutorial. Thanks for the help.

I can't figure out how to create a cocoa touch static library in Xcode 4.

I've created static library in Xcode 3 and it worked fine. I used this tutorial. Thanks for the help.

First step I create cocoa touch static library

Create static library in Xcode 4

Next we can see our static library in product directory. But now this uncompiled library.

Create static library in Xcode 4

Next step I add some objective-c class. This class is will perform various actions, for example show NSLog messages.

Create static library in Xcode 4

Then I made sure there is this class exist in compile source

Create static library in Xcode 4

After that I build my target

Create static library in Xcode 4

Now I use this static library in other projects, but wh开发者_如何转开发en I use it I get a error when linking files with my static library.


Open Xcode > Create New Project > iOS > Framework & Library > Cocoa Touch Static Library


I struggled with this myself and, on another SO thread, found this:

iOS-Universal-Framework


To create an static library you can try to figure out with example example here: http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial

0

精彩评论

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