ChemDev
ChemDev

Reputation: 837

Git submodules vs. iOS/Mac frameworks

I am developing several libraries that I plan on utilizing in a series of Mac and iOS apps. I want input on what the best tool is to share the code between projects. The two options I am considering are frameworks and Git submodules.

Here is the relevant information: 1. I am personally developing all of the libraries. I don't work on a team. 2. These libraries will provide code relating to UI and cloud service integration. 3. Once the libraries are written, I don't plan on updating them often unless they break.

It seems that Git submodules provide better control for managing which versions of an app reference which versions of a library. However, frameworks might be easier to integrate into an Xcode project.

Upvotes: 0

Views: 388

Answers (2)

Gal Blank
Gal Blank

Reputation: 2090

Framework is a way to distribute same code to third party clients while Submodules is a way to manage GIT repos, so not a lot of intersection there. But, in my experience Framework are much cleaner than submodules because then there is a single source of truth for any N clients while submodules is something you need to copy to every new repo creating code duplication

Upvotes: 0

Tancrede Chazallet
Tancrede Chazallet

Reputation: 7255

Frameworks are mostly useful to protect your sources. If it's for your own company, the impact is limited. It can help to make things more clear etc, but doesn't bring any advantage over just using a subproject for example.

In any case I would use git submodules because it's the clean way to do things.

Upvotes: 1

Related Questions