Giter Club home page Giter Club logo

objectivegit-ios-example's Introduction

ObjectiveGit-iOS-Example

This is a quick guide on setting up ObjectiveGit for an iOS project. The example code clones a repository if it doesn't already exist, and displays the latest commit message. Don't expect much; it's only meant to get you started.

Adding the ObjectiveGit framework to a new iOS project

  1. Create a new project on Xcode (make sure to check "initialize a git repository"). Do not use spaces in the project name; the bootstrap script for ObjectiveGit will not work with paths with spaces
  2. At the command line, cd into your project root, and run git submodule add [email protected]:libgit2/objective-git.git.
  3. Make sure you have installed Brew, a package manage for OSX, which the bootstrap script uses to pull dependencies
  4. cd into objective-git, then run ./script/bootstrap. The first build may take a while (~10 minutes)
  5. Open Finder (open .). Drag ObjectiveGitFramework.xcodeproj into Xcode onto your project. Xcode may ask to "Share working copy"; just click yes; it doesn't seem to matter
  6. In the "Build Phases" tab, add ObjectiveGit-iOS-arm64 under "Target Dependencies"
  7. Under "Link Binary With Binaries", add "libObjectiveGit-iOS.a from 'ObjectiveGit-iOS-arm64' target", libz.dylib, and libiconv.dylib
  8. In the "Build Settings" tab, set "Always Search User Paths" to YES
  9. Add $(BUILT_PRODUCTS_DIR)/usr/local/include, and $(PROJECT_DIR)/objective-git/External/libgit2/include to "User Header Search Paths"
  10. Add -all_load to "Other Linker Flags"
  11. Don't forget to #import <ObjectiveGit/ObjectiveGit.h> as you would with any other framework

Cloning/Using this project as a template

  1. git clone ...
  2. git submodule update --init --recursive
  3. cd objective-git
  4. ./script/bootstrap
  5. In Xcode, choose "Open Other" and import the .xcodeproj file
  6. Everything else should already be set up

Notes

objectivegit-ios-example's People

Contributors

raekye avatar

Watchers

Masatsugu Futamata avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.