My favorites | Sign in
Project Logo
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
Code license: MIT License
Labels: C, Objective-C, GCC, iPhone, MacOSX, Blocks
Show all Featured wiki pages:
FAQ
People details
Project owners:
  landon.j.fuller

Introduction

Plausible Blocks (PLBlocks) provides a drop-in runtime and toolchain for using blocks in iPhone 2.2+ and Mac OS X 10.5 applications. Both the runtime and compiler patches are direct backports from Apple's Snow Leopard source releases.

PLBlocks is provided by Plausible Labs.

Supported Architectures (1.0):

Targets

Hosts

Languages

If you're interested in supporting additional platforms (Linux, Windows, etc.) please feel free to join the development mailing list

Download

Plausible Blocks 1.0 SDK

Plausible Blocks 1.1-beta2 SDK

The Plausible Blocks runtime makes use of custom, prefixed symbol names to avoid any binary conflicts when Apple adds block support to iPhone OS, or when running your binaries on Mac OS X 10.6.

The provided compilers are based directly on the Apple standard, stable compiler versions as shipped with the Mac OS X and iPhone SDKs. The runtime is based on Apple's original implementation donated to the LLVM project.

The 1.1 compiler remains compatible with the existing PLBlocks 1.0 runtime, but use of new features (garbage collection, C/C++ support) also requires a PLBlocks 1.1+ runtime.

Installation & Use

Plausible Blocks is composed of two pieces:

To install the SDK, simply install the included “Plausible Blocks SDK” package. Once installed, an additional “GCC 4.2 (Plausible Blocks)” compiler will be available for selection in your Xcode project and targets. To build with the new compiler, simply select in either your project’s build settings, or on a per-target basis:

In addition to the SDK, you’ll need to include the PLBlocks runtime framework in your application. It is provided as an embeddable framework for Mac OS X, and as a static framework for iPhone applications.

To include in your project:

  1. Copy the Mac OS X or iPhone PLBlocks.framework to your project directory
  2. Within Xcode, select “Add -> Existing frameworks” and add the copied PLBlocks.framework to your project.
  3. Ensure that PLBlocks.framework has been added to your targets “Link Binary With Libraries” section.
  4. (Mac OS X Only) Add a new “Copy Files” build phase to copy PLBlocks.framework to your application’s “Framework” directory.
  5. Set the project, or a specific target, to use the “GCC 4.2 (Plausible Blocks)” compiler.

Additional Resources

If you'd like to read more about using blocks in your own software, we recommend:

Building

To build PLBlocks, select one of the following targets:

The project should build on Mac OS X 10.5 and 10.6. In addition to Xcode 3.1.3 or 3.2, the iPhone 3.0 SDK is required.

Building the full SDK, including compilers, may take an extraordinarily long time. Unless you are experimenting with the compiler toolchain — or you are the type to enjoy watching paint dry — building only the Runtime targets during development is highly recommended.









Hosted by Google Code