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!
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.
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:
ObjectiveGitFramework.xcodeproj
file into the project navigator.ObjectiveGit.framework
.ObjectiveGit.framework
to that. This will package the framework with
your application as an embedded private framework.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.#import <ObjectiveGit/ObjectiveGit.h>
as you would with any
other framework.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:
ObjectiveGitFramework.xcodeproj
into the Project Navigator.ObjectiveGit-iOS
as a target dependency of your application.libObjectiveGit-iOS.a
, libz.dylib
, and libiconv.dylib
.YES
$(BUILT_PRODUCTS_DIR)/usr/local/include
and
PATH/TO/OBJECTIVE-GIT/External/libgit2/include
to the "User Header
Search Paths"-all_load
to the "Other Linker Flags"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.
ObjectiveGit is released under the MIT license. See the LICENSE file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型