1

I have made some categories of some classes such as NSArray and NSDictionary. I would like to use these categories in several projects. I may modify the files in any project, and I want all other projects get the updated files.

What's the best way to share files among projects?

I have read this problem and this problem. Someone recommended to add targets into the same project. This is not a good solution in my situation, because my projects are not related to each other, and I have many projects.

Community
  • 1
  • 1
ukim
  • 2,395
  • 15
  • 22

1 Answers1

1

In your case you can create a static library and put all of your classes, class methods or sub classes then you can link to your individual projects.

Static libraries provide a convenient mechanism for sharing code among multiple applications. On iOS, static libraries are the only supported library type. This document explains how to extract code from your application into a new static library and how to use that static library in multiple applications.

Whenever you want to add/edit/remove something you can edit and rebuild your library. Creating the Library and Creating a Static Library in iOS.

When Xcode 6 and IOS 8 released IOS will support frameworks as well.

modusCell
  • 13,151
  • 9
  • 53
  • 80