subjective-c
subjective-c

Reputation: 1823

How to develop distributable UI controls for iPhone?

I would like to develop a reusable UI control for iPhone. How should I go about doing this? When I say reusable I mean it's packaged in a dll (or whatever is used on iPhone platform) so it can be reused on multiple projects.

Upvotes: 6

Views: 4809

Answers (4)

Michael Pryor
Michael Pryor

Reputation: 25356

You probably want to provide custom Interface Builder objects, or maybe source code libraries.

Upvotes: 2

Mike Abdullah
Mike Abdullah

Reputation: 15013

You have two options:

  1. Supply the full source code. Other developers can then add it directly to their app.
  2. Distribute the compiled version of your code as a static library.

As you're planning to develop a UI control, I suggest you also develop an IB plugin and ship that with it too.

Upvotes: 2

JamesSugrue
JamesSugrue

Reputation: 15011

Well, the Xcode way would be to bundle your code into a Framework and link to that. However, under the iPhone you can't link to non Apple approved frameworks (even if they are your own)

So you would probably have to link in the source to the reusable code. A good article here

Upvotes: 1

Marc Novakowski
Marc Novakowski

Reputation: 45408

While dynamic libraries are not allowed to be used in iPhone applications that are to be sold on the iPhone App Store, here's a tutorial on building static libraries with the iPhone SDK. (assuming you don't want to release source code)

Upvotes: 5

Related Questions