|
Project Information
Featured
Downloads
Links
|
IntroductionPlausible 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. 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. PLBlocks is provided by Plausible Labs. Supported ArchitecturesHosts
Targets
Languages
If you're interested in supporting additional platforms (Linux, Windows, etc.) please feel free to join the development mailing list Xcode 4.2 is not currently supported, as Apple is no longer shipping GCC. DownloadCompiler DownloadDownload the Compiler SDK to build a project that uses PLBlocks. Runtime DownloadDownload the runtime to include PLBlocks in your own project. While the 1.0 runtime is still supported, use of new features (garbage collection, C/C++ support) requires a PLBlocks 1.1+ runtime. Installation & UsePlausible 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:
Additional ResourcesIf you'd like to read more about using blocks in your own software, we recommend:
BuildingTo 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. ContributingPlease feel free to join the development mailing list. We're happy to accept patches to support additional platforms (eg, Linux) and compilers (such as LLVM/clang). Please also consider donating to support this and future open source development: Donate via Paypal |