1 Star 0 Fork 0

xiangism / objective-git

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ObjectiveGit

Carthage compatible Build Status

ObjectiveGit provides Cocoa bindings to the libgit2 library.

Not all libgit2 features are available yet. If you run across something missing, please consider contributing a pull request!

Getting Started

To start building the framework, you must install the required dependencies, xctool and cmake. We recommend using Homebrew to install these two tools.

Once you have the dependencies you should clone this repository and then run script/bootstrap. This will automatically pull down and install any other dependencies.

Note that the bootstrap script automatically installs some libraries that ObjectiveGit relies upon, using Homebrew. If you want this behavior, please make sure you have Homebrew installed.

To develop ObjectiveGit on its own, open the ObjectiveGitFramework.xcworkspace file. Note that Xcode 6.3 is required to build the framework and run unit tests. Projects that must use an older version of Xcode can use Carthage to install pre-built binaries or download them from the releases.

Importing ObjectiveGit on OS X

It is simple enough to add the ObjectiveGit framework to a desktop application project. An example of this is the CommitViewer example on GitHub. In summary:

  1. Drag the ObjectiveGitFramework.xcodeproj file into the project navigator.
  2. Add the ObjectiveGit framework as a target dependency of your application.
  3. Link your application with ObjectiveGit.framework.
  4. Add a new "Copy Files" build phase, set the destination to "Frameworks" and add ObjectiveGit.framework to that. This will package the framework with your application as an embedded private framework.
  5. Set the “Header Search Paths” (HEADER_SEARCH_PATHS) build setting to the correct path for the libgit2 headers in your project. For example, if you added the submodule to your project as External/ObjectiveGit, you would set this build setting to External/ObjectiveGit/External/libgit2/include. If you see build errors saying that git2/filter.h cannot be found, then double-check that you set this setting correctly.
  6. Don't forget to #import <ObjectiveGit/ObjectiveGit.h> as you would with any other framework.

Importing ObjectiveGit on iOS

Getting started is slightly more difficult on iOS because third-party frameworks are not officially supported. ObjectiveGit offers a static library instead. An example of this is the ObjectiveGit iOS Example on GitHub. In summary:

  1. Drag ObjectiveGitFramework.xcodeproj into the Project Navigator.
  2. Add ObjectiveGit-iOS as a target dependency of your application.
  3. Link your application to libObjectiveGit-iOS.a, libz.dylib, and libiconv.dylib.
  4. In your target's build settings:
    1. Set "Always Search User Paths" to YES
    2. Add $(BUILT_PRODUCTS_DIR)/usr/local/include and PATH/TO/OBJECTIVE-GIT/External/libgit2/include to the "User Header Search Paths"
    3. Add -all_load to the "Other Linker Flags"

Contributing

Fork the repository on GitHub, make it awesomer (preferably in a branch named for the topic), send a pull request.

All contributions should match GitHub's Objective-C coding conventions.

You can see all the amazing people that have contributed to this project here.

License

ObjectiveGit is released under the MIT license. See the LICENSE file.

The MIT License Copyright (c) 2012 libgit2 contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Objective-C bindings to libgit2 展开 收起
Objective-C
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Objective-C
1
https://gitee.com/xiangism/objective-git.git
git@gitee.com:xiangism/objective-git.git
xiangism
objective-git
objective-git
master

搜索帮助