Skip to content
The Objective-C block utilities you always wish you had.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
A2DynamicDelegate @ 26b7437


Blocks in C and Objective-C are downright magical. They make coding easier and potentially quicker, not to mention faster on the front end with multithreading and Grand Central Dispatch. BlocksKit hopes to facilitate this kind of programming by removing some of the annoying - and, in some cases, impeding - limits on coding with blocks.

BlocksKit is a framework and static library for iOS 4.0+ and Mac OS X 10.6+.

What's In The Box

  • Performing blocks on an NSObject, with or without delay.
  • Key-value observation (<NSKeyValueObserving>) with block handlers.
  • Associated objects in an Obj-C API. (Not directly block-related.)
  • NSArray, NSSet, NSDictionary, and NSIndexSet filtering and enumeration.
  • Filtering for mutable collections.
  • NSInvocation creation using a block.
  • NSTimer block execution.
  • Both delegation and block callbacks on NSURLConnection.
  • Delegate callback for NSCache.

UIKit Extensions

  • UIAlertView, UIActionSheet with block callbacks and convenience methods.
  • Block initializers for UIControl and UIBarButtonItem.
  • Block initializers for UIGestureRecognizer.
  • On-touch utilities for UIView.
  • Block callbacks for MFMailComposeViewController and MFMessageComposeViewController.
  • Delegate alternative for UIWebView.


BlocksKit can be added to a project using CocoaPods.


  • Download a release of BlocksKit.
  • Move BlocksKit.framework to your project's folder. Drag it from there into your project.
  • Add BlocksKit.framework to "Link Binary With Libraries" in your app's target. Make sure your app is linked with CoreGraphics, Foundation, MessageUI, and UIKit.
  • In the build settings of your target or project, change "Other Linker Flags" (OTHER_LDFLAGS) to -ObjC -all_load.
  • Insert #import <BlocksKit/BlocksKit.h> in your project's prefix header.
  • Make amazing software.


  • Download a release of BlocksKit.
  • Move libBlocksKit.a and Headers to your project's folder, preferably a subfolder like "Vendor".
  • In "Build Phases", Drag libBlocksKit.a into your target's "Link Binary With Libraries" build phase.
  • In the build settings of your target or project, change "Other Linker Flags" to -ObjC -all_load. Make sure your app is linked with CoreGraphics, Foundation, MessageUI, and UIKit.
  • Change (or add) to "Header Search Paths" the relative path to BlocksKit's headers, like $(SRCROOT)/Vendor/Headers.
  • Insert #import <BlocksKit/BlocksKit.h>` in your project's prefix header.


Documentation is exhaustive and done using AppleDoc.

An Xcode 4 compatible documentation set is available using this Atom link. Add it to Xcode 4's preferences and it'll download automatically.

You can also view the documentation online at my website.


BlocksKit is created and maintained by Zachary Waldowski under the MIT license (hello, nice to meet you). All of the included code is licensed either under BSD, MIT, or is in the public domain. The project itself is free for use in any and all projects. You can use BlocksKit in any project, public or private, with or without attribution.

Unsure about your rights? Read more.


BlocksKit takes, repurposes, fiddles with, and groups together a variety of block-related code generally found here on GitHub.

The following people (in alphabetical order) have their code lovingly enshrined in BlocksKit:

Individual credits exist in the header files and documentation.

Something went wrong with that request. Please try again.