Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add README

  • Loading branch information...
commit f81e48859735aad40d3eda2e250072ea77243e22 1 parent 43e2898
@Abizern authored
Showing with 33 additions and 0 deletions.
  1. +33 −0 README.textile
View
33 README.textile
@@ -0,0 +1,33 @@
+h1. Commit Viewer
+
+This is an example project demonstrating how to add the "ObjectiveGit":https://github.com/libgit2/objective-git framework to a Cocoa application.
+
+Don't expect it to do too much, it just lets you open a repository and presents some information from the commit pointed to by `head`.
+
+h2. Adding the ObjectiveGit Framework.
+
+These are the steps to add the framework to your project
+
+* Create an Xcode project for your application.
+
+* Get the files for the ObjectiveGit framework.
+
+ How you do this is up to you. In this example I've added it as a Git submodule, and I used `git submodule --init --recursive` after adding it, because the ObjectiveGit framework has the "libgit2":https://github.com/libgit2/libgit2 framework as a submodule and this takes care of setting that up as well.
+
+* From the Finder, drag the ObjectiveGit Xcode project bundle into Xcode's file explorer.
+
+ I added it under the application project. You can add it as a sibling project, and Xcode will give you a choice of setting up a separate workspace.
+
+* Select the Application project in the file explorer and it will bring up the project viewer.
+
+ In here you can see the settings for the project and the target. Select the target and go to the Build Phases section.
+
+* Add the ObjectiveGit framework as a target Dependency
+
+* Add the ObjectiveGit framework to the Link Binary With Libraries section
+
+* Add a new Copy Files build phase, set the destination to be Frameworks, and add the ObjectiveGit framework to that.
+
+* As with any other framework, when you want to use any of it's methods, be sure to import @<ObjectiveGit/ObjectiveGit.h>@
+
+And that's it! Use this project to see what the settings look like after they have been applied.
Please sign in to comment.
Something went wrong with that request. Please try again.