Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Cocoa and Cocoa Touch, nearly all methods that could possibly fail for reasons you as a developer can’t control take a pointer to an NSError pointer as their last parameter. Why a pointer to a pointer? Because that way the called method can create an instance of NSError and you can access it afterwards through your NSError pointer.
Before we go any further, let’s look at an example in the following listing.