OctoKit

OctoKit is a Cocoa and Cocoa Touch framework for interacting with the GitHub API, built using AFNetworking, Mantle, and ReactiveCocoa.

Getting Started

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:

  1. Add the OctoKit repository as a submodule of your application's repository.
  2. Run script/bootstrap from within the OctoKit folder.
  3. Drag and drop OctoKit.xcodeproj, OctoKitDependencies.xcodeproj, ReactiveCocoa.xcodeproj, and Mantle.xcodeproj into the top-level of your application's project file or workspace. The latter three projects can be found within the External folder.
  4. On the "Build Phases" tab of your application target, add OctoKit, ReactiveCocoa, and Mantle to the "Link Binary With Libraries" phase.
    • On iOS, add the .a libraries.
    • On OS X, add the .framework bundles. All of the frames must also be added to any "Copy Frameworks" build phase.
  5. 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).
  6. 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.

Copying the Frameworks

This is only needed on OS X.

  1. Go to the "Build Phases" tab of your application target.
  2. If you don't already have one, add a "Copy Files" build phase and target the "Frameworks" destination.
  3. Drag OctoKit.framework from the OctoKit project’s Products Xcode group into the "Copy Files" build phase you just created (or the one that you already had).
  4. A reference to the framework will now appear at the top of your application’s Xcode group, select it and show the "File Inspector".
  5. Change the "Location" to "Relative to Build Products".
  6. Now do the same (starting at step 2) for the frameworks within the External folder.

License

OctoKit is released under the MIT license. See LICENSE.md.