The Foundation library provides a set of classes that work as a base layer for Objective-C classes. Objective-C is the preferred programming language for all iOS applications. The Foundation library includes a small set of basic utility classes. For example, one of the classes provides memory management services such as memory allocation and deallocation. Classes in the Foundation library define data type such as NSString, NSArray, or NSDictionary, provide operating system services such as NSError, NSBundle, NSStream, NSurl, and provide Objective-C Language services such as NSAutorelease-Pool, NSException.