Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

best practice: how to add an external framework to xcode project which is under version control?

xcode project under version control. multiple developers work on it. when adding 3rd party frameworks i prefere to keep them outside the git repo.

so whats the best practice when it comes to adding a framework (i.e. facebookSDK) to the project?

currently frameworks are "referenced". this way i have a relative path pointing outside my git repo in project.pbxproj...fail.

pretty confident that the answer is straight forward/simple and actually easy to find in the web, but it seems like i'm asking google the wrong questions...

thx.

like image 278
fetzig Avatar asked Jun 10 '13 17:06

fetzig


People also ask

How do I add a framework to a project in Xcode?

To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.


1 Answers

AFAIK, there are basically two ways to be absolutely sure that a given commit uses a known version of a framework.

  1. Commit the built framework into your repository. This is the common approach.
  2. Use submodules to reference a repository that houses builds of the framework. You'll probably have to create and maintain such a repository yourself.

Option 2 has the benefit of keeping your repository small, but is more hassle, particularly since submodules are something of a pain to work with.

like image 175
Marcelo Cantos Avatar answered Oct 14 '22 23:10

Marcelo Cantos