---
title: "Objective-C Foundation Framework"  
description: "The Foundation framework defines a base layer of ObjC classes, Foundation framework includes the root object class, classes representing basic data ty"  
author: "Tarun Kumar"  
published: 2015-07-18  
updated: 2018-03-13  
canonical: https://www.mindstick.com/blog/10928/objective-c-foundation-framework  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 2 minutes  

---

# Objective-C Foundation Framework

Previously we seen how to bind objects into methods dynamically

:

Objective-C : [Dynamic Binding](https://www.mindstick.com/interview/2391/what-is-the-difference-between-static-binding-and-dynamic-binding-in-java)\

The [Foundation](https://www.mindstick.com/articles/157275/passed-peoplecert-it-infrastructure-library-itil-4-foundation-exam-today) [framework](https://www.mindstick.com/forum/34615/software-framework-vs-library) introduces several paradigms to avoid confusion in common situations, and to introduce a level of consistency across class hierarchies. This consistency is done with some standard policies, such as that for object ownership (that is, who is [responsible](https://answers.mindstick.com/qa/94149/who-is-one-of-the-responsible-person-for-the-department-of-space-dos) for disposing of objects), and with [abstract classes](https://www.mindstick.com/forum/158818/what-are-abstract-classes-in-oop-and-when-are-they-used) like NSEnumerator. These new paradigms reduce the number of special and exceptional cases in an API and allow you to code more efficiently by reusing the same mechanisms with various kinds of objects.

\
Many of these classes have [closely related](https://answers.mindstick.com/qa/52066/the-52nd-amendment-to-the-constitution-of-india-is-most-closely-related-to) [functionality](https://www.mindstick.com/blog/136/using-watermark-functionality-in-textbox-by-jquery):

• Data storage : NSArray, NSDictionary, and NSSet provide storage for Objective-C objects of any class.

\

**•Text and strings :** NSCharacterSet represents various groupings of [characters](https://answers.mindstick.com/qa/42112/who-is-the-originator-of-avengers-characters) that are used by the NSString and NSScanner classes. The NSString classes represent text strings and provide methods for searching, combining, and comparing strings. An NSScanner object is used to scan numbers and words from an NSString object.

\

**•Dates and times :** The NSDate, NSTimeZone, and NSCalendar classes store times and dates and represent calendrical information. They offer methods for calculating date and time differences. Together with NSLocale, they provide methods for displaying dates and times in many formats and for adjusting times and dates based on location in the world.

\

**·[Exception handling](https://www.mindstick.com/articles/12240/introduction-of-exception-handling) :** Exception handling is used to handle unexpected situations and it's offered in Objective-C with NSException.

\

**·[File handling](https://www.mindstick.com/interview/34127/how-can-you-integrate-file-handling-with-cloud-storage) :** File handling is done with the help of class NSFileManager.

\

**·URL loading system :** A set of classes and protocols that provide access to common Internet protocols.

[Generally, we use Foundation classes something like: #import <Foundation/NSString.h> to import a Objective-C class, but in order avoid importing too many classes, it's all imported in #import <Foundation/Foundation.h>.]

---

Original Source: https://www.mindstick.com/blog/10928/objective-c-foundation-framework

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
