Open Source: Compiler Stubs Enabling Weak References With ARC On Pre-iOS 5 Devices

With the addition of automatic reference counting you probably have – or at least have considered dropping support for older iOS versions.

That’s where a project I came across earlier comes in – providing compiler stubs so you can use weak references with ARC on iOS 4.   The real runtime functions are used if present so this code only takes effect on pre-iOS 5 versions.

The project will also automatically make use of MAZeroingWeakRef if it is being used.

The project is known as PLWeakCompatibility from Plausible Labs and can be found on the Github page where you’ll also find full installation instructions.

A very useful project for those still needing to support older iOS versions.

©2012 iPhone, iOS 5, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Leave a Reply

Your email address will not be published. Required fields are marked *