OctoKit is a Cocoa and Cocoa Touch framework for interacting with the GitHub API, built using AFNetworking, Mantle, and ReactiveCocoa.
OctoKit is still new and moving fast, so we may make breaking changes from time-to-time, but it has partial unit test coverage and is already being used in GitHub for Mac's production code.
To add OctoKit to your application:
- Add the OctoKit repository as a submodule of your application's repository.
- Run
script/bootstrap
from within the OctoKit folder. - Drag and drop
OctoKit.xcodeproj
into the top-level of your application's workspace (or into the top-level of your project file to create a new workspace). - Drag and drop
ReactiveCocoa.xcodeproj
into the top level of your workspace. (This project can be found in theExternal
folder). - Drag and drop
Mantle.xcodeproj
into the top level of your workspace. (This project can be found in theExternal
folder). - On the "Build Phases" tab of your application target, add OctoKit to the
"Link Binary With Libraries" phase.
- On iOS, add
libOctoKit.a
. - On OS X, add
OctoKit.framework
. The framework as well as its subframeworks (ReactiveCocoa.framework
andMantle.framework
) must also be added to any "Copy Frameworks" build phase.
- On iOS, add
- Add
$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include $(inherited)
to the "Header Search Paths" build setting (this is only necessary for archive builds, but it has no negative effect otherwise). - For iOS targets, add
-ObjC
to the "Other Linker Flags" build setting.
If you would prefer to use CocoaPods, there are some OctoKit podspecs that have been generously contributed by third parties.
This is only needed on OS X.
- Go to the "Build Phases" tab of your application target.
- If you don't already have one, add a "Copy Files" build phase and target the "Frameworks" destination.
- Drag
OctoKit.framework
from the OctoKit project’sProducts
Xcode group into the "Copy Files" build phase you just created (or the one that you already had). - A reference to the framework will now appear at the top of your application’s Xcode group, select it and show the "File Inspector".
- Change the "Location" to "Relative to Build Products".
- Now do the same (starting at step 2) for the ReactiveCocoa and Mantle frameworks.
OctoKit is released under the MIT license. See LICENSE.md.