Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 773
4thSpace Avatar asked Mar 30 '09 05:03

4thSpace


People also ask

How can I make my own iOS app framework?

Select Framework in the Framework & Library section on the iOS tab, then click Next. Type DBHelper in the Product Name, unselect Include Unit Tests, make sure the language is Swift, then click Next. In the next window find the root folder of your project, select it, click New Folder, type Modules, click Create.

What is the difference between framework and library in iOS?

By using a library, you can control the flow of the application and call the library. In contrast, when you use a framework, the control is inverted, i.e., the framework controls the flow and calls your code.

What GUI framework does Apple use?

UIKit provides a variety of features for building apps, including components you can use to construct the core infrastructure of your iOS, iPadOS, or tvOS apps.


2 Answers

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/

like image 144
Clint Harris Avatar answered Sep 30 '22 12:09

Clint Harris


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

like image 41
Rog Avatar answered Sep 30 '22 13:09

Rog