4thSpace
4thSpace

Reputation: 44352

Creating an iPhone library/framework

Are there any tutorials describing how to create a library or is it framework for the iPhone? I have a number of methods that are shared between applications. These will be better maintained as a library.

Upvotes: 6

Views: 4524

Answers (3)

Adam
Adam

Reputation: 33146

A much more recent (and more powerful) way to do the "single library file that covers both simulator and devices":

Build fat static library (device + simulator) using Xcode and SDK 4+

(I wrote one of the posts referred to in the accepted answer; that was valid for Xcode3 at the time, but Apple deliberately broke it with later versions, and offered no alternative. So, we ended up with the SO question / answer above)

Upvotes: 0

Rog
Rog

Reputation: 17170

There is a lot of information on the web that can help with this for example this.

Upvotes: 2

clint
clint

Reputation: 14534

Put your code in a static library (as Roger indicated via his link). However, consider using an Xcode cross-project reference to "import" that static library into all the other projects that need it. I've whipped up a tutorial explaining how to do this (and why I think it's better than creating a "fat" Universal Binary): http://www.clintharris.net/2009/iphone-app-shared-libraries/

Upvotes: 3

Related Questions