Libraries is another one of those rather obscure topics for newbie programmers, kinda like Blocks and Delegates/Protocols. Think of libraries as just that, a resource you can use which doesn’t belong to you. A loaner 🙂
NOTE: If you need a nice tutorial on Blocks or Delegates, check out:
Video Tutorial: Objective-C Blocks
Video Tutorial: Objective-C Protocols and Delegates
Ok back to our tutorial! Well a library is a piece of code that you can use (by importing it into your projects) but its not yours, so you can’t really do what you want to that piece of code, except use its functionality. In this tutorial we will create our own library and then import in into another project for its use.
The basic steps are:
1. Create your code. Usually Class method laden classes that create no state! Project must be CocoaTouch Library Framework.
2. Compile and create .a file.
3. Import that .a file into new projects.
In order to show you I prepared this small video:
For a more complete tutorial you can visit RW.com’s Creating a Static Library in iOS tutorial at: