fetzig
fetzig

Reputation: 1663

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.

Upvotes: 10

Views: 3030

Answers (1)

Marcelo Cantos
Marcelo Cantos

Reputation: 186098

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.

Upvotes: 7

Related Questions