Framework is a directory that contains shared libraries, headers to access shared library code, and other image and sound resource files. A shared library defines methods or functions that can be called by applications.

IOS provides a lot of frameworks that you can call in your applications. To use a framework, you need to add it to your project before your project can use it. Many applications use frameworks such as Foundation, UIKit, and Core Graphics. Depending on the template you choose for your application, the relevant framework is automatically introduced. If the default framework does not meet the requirements of your application, you can also add the required framework.

See what frameworks are included in the HelloWorld.xcodeProj project (note: HelloWorld.xcodeProj is a project in Your First iOS App Tutorial) 1. Open the HelloWorld.xcodeProj project in XCode (if it is not already open) 2\. Click in the Project Navigator window and click on the triangle icon in front of the Frameworks directory. You see: the UIKit framework, Foundation, framework, and CoreGraphics. 3 \ framework. Click on the triangle in front of any framework and then click on the triangle in front of Headers to see the header file in the framework. Each framework corresponds to a layer in iOS, and each layer is built on top of the layer below it. Try to use the upper frame instead of the lower frame. A higher-level framework is an object-based abstraction of the underlying framework.Copy the code

IOS apps are based on the Foundation and UIKit frameworks

When you’re developing an application, the main frameworks to use are Foundation and UIKit, because they contain most of what you need.

The Foundation framework provides basic system services for all applications

Your applications, UIKit and other frameworks are built on top of the Foundation framework. The Foundation framework encapsulates many of the features of the Core Foundation framework in Object-C.

Using Foundation you can:

  • Create and manage collections, such as arrays and dictionaries
  • Access images and other resources stored in the application
  • Create and manage strings
  • Submit and receive notifications
  • Create date and time objects
  • Automatically discover devices on the IP network
  • URL operation flow
  • Executing asynchronous code

You’ve already used the Foundation framework in Your First iOS App. For example, you might use an instance of the NSString class to store the userName entered by the user. You also create a string using the Foundation framework’s initWithFormat method.

The UIKit framework provides classes for creating touch-based user interfaces

All iOS apps are based on UIKit, and you can’t take an app out of the framework. UIKit provides mechanisms for drawing on the screen, capturing events, and creating common user interface elements. UIKit also organizes complex projects by managing the components displayed on the screen.

Using UIKit you can:

  • Build and manage your user interface
  • Capture touch and movement-based events
  • Render text and Web content
  • Optimize your multitasking program
  • Create custom user interface elements

In the YouFirst iOS App Tutorial, you also used UIKit. When you take a closer look at how the program works, you’ll see that the UIApplicationMain function creates an instance of the UIApplication class that captures incoming user events. You implement the UITextFieldDelegate protocol and then hide the keyboard when the user presses Done. You’re actually using UIKit to create UITextField, UILabel, and UIButton classes on the UI.

Other important frameworks you need to know

Core Data, Core Graphics, Core Animation, and OpenGLES frameworks are all advanced technologies. So these frameworks are also important for developing your application, and they all take time to learn and master.

The Core Data framework manages the application Data model

Core Data provides object management, and with Core Data, you can create model objects and manage them. You manage the connections between these objects and modify the data. Core Data provides built-in SQLlite technology to efficiently manage Data.

With Core Data you can:

  • Store and receive objects in the repository
  • Provides basic undo/redo
  • Automatically validate property values
  • Filter, group, and optimize data in memory
  • The results in table view with [NSFetchedResultsController] management
  • Support for document-based applications

The Core Graphics framework helps you create Graphics

High quality graphics are important for all iOS applications. The easiest and fastest way to create graphics in iOS is to use the pre-rendered graphics based views and controls provided by the UIKit framework, and then let UIKit and iOS do the drawing. But when you need to create complex Graphics, Core Graphics provides a lower-level library to help.

Using Core Graphics you can:

  • Create path-based drawing
  • Anti-aliasing rendering
  • Add gradients, images, and colors
  • Use coordinate-space transformations.
  • Create, display, and analyze PDF documents

Core Animation allows you to create advanced animations and virtual effects

UIKit provides animations built on top of Core Animation. If you need more advanced functionality than UIKit, you can use Core Animation directly. The Core Animation interface is included in the Quartz Core framework. With Core Animation, you can create nested objects and manipulate, rotate, scale, and transform them. With Core Animation, you can create dynamic user interfaces without using lower-level graphical apis such as OpenGL ES.

Using Core Animation you can:

  • Creating custom animations
  • Add timing functions and graphics
  • Frame animation support
  • Specify graphical layout constraints.
  • Group multiple-layer changes into anatomic update.

OpenGL ES framework provides 2D and 3D drawing tools

OpenGL ES supports 2D and 3D drawing. Apple’s OpenGL ES implementation provides high-speed, full-screen gaming-like applications through hardware.

Using OpenGL ES you can:

  • Create 2D and 3D graphics
  • Create more complex graphics, such as data virtualization, simulated flight, or video games
  • Access the underlying graphics device

Add additional frameworks to the project as needed

There are many frameworks you can add to your programs. When you decide to use a framework but it is not included in your project, you need to add it to your project.

Add other frames to the project

1 Open the project 2 click the project name Click Build Phases at the top of the Project Editor. 5 Click the triangle in front of the Link Binary With Libraries to open this grouping Add a frame by clicking Add (+) 7 Select a frame from the list and click the Add buttonCopy the code
The name of the The first to introduce The prefix describe
Accelerate.framework 4.0 cblas,vDSP Contains accelerated math and DSP functions. Please see theAccelerated frame reference 。
AddressBook.framework 2.0 AB Contains functions that directly access the user’s contact database. Please see theAddress book framework reference.
AddressBookUI.framework 2.0 AB Contains classes that display the system – defined contact pick and edit interface. Please see theIOS Address Book UI framework reference 。
AssetsLibrary.framework 4.0 AL See classes that display user photos and videosResource library framework reference 。
AudioToolbox.framework 2.0 AU,Audio Contains interfaces for processing audio stream data and playing or recording audio. Please see theAudio toolbox framework reference.
AudioUnit.framework 2.0 AU,Audio Contains interfaces for loading and using audio units. Please see theAudio unit framework reference.
AVFoundation.framework 2.2 AV Contains an Objective-C interface for playing or recording audio. Please see theAV Foundation framework reference.
CFNetwork.framework 2.0 CF Includes an interface to access the network over WiFi or cellular wireless. Please see theCFNetwork framework reference.
CoreAudio.framework 2.0 Audio Contains the various data types used by the Core Audio framework. Please see theCore Audio framework reference 。
CoreData.framework 3.0 NS Contains interfaces to manage the application data model. Please see theCore Data framework reference 。
CoreFoundation.framework 2.0 CF Provides some basic software services, including common data type abstraction, string utilities, population type utilities, resource management, and preference Settings. Please check the rovCore Foundation framework reference.
CoreGraphics.framework 2.0 CG Contains the Quartz 2D interface. Please see theCore Graphics framework reference 。
CoreLocation.framework 2.0 CL An interface that contains information to determine the user’s location. Please see theCore Location framework reference.
CoreMedia.framework 4.0 CM Contains low-level routines that manipulate audio and video. Please see theCore Media framework reference.
CoreMotion.framework 4.0 CM Contains interfaces to access data from accelerometers and gyroscopes. Please see theCore Motion framework reference.
CoreTelephony.framework 4.0 CT A routine that contains access to phone-related information. Please see theCore Telephony framework reference.
CoreText.framework 3.2 CT Contains a text layout rendering engine. Please see theCore Text reference set.
CoreVideo.framework 4.0 CV Contains low-level routines that manipulate audio and video. Do not use the framework directly.
EventKit.framework 4.0 EK Contains an interface to access user calendar event data. Please see theEvent Kit framework reference.
EventKitUI.framework 4.0 EK Contains classes that display the standard system calendar interface. Please see theEvent Kit UI framework reference.
ExternalAccessory.framework 3.0 EA Contains interfaces to communicate with peripherals. Please see theExternal Accessory framework reference.
Foundation.framework 2.0 NS Classes and methods that contain the Cocoa Foundation layer. Please see theFoundation Framework Reference.
GameKit.framework 3.0 GK Contains the point-to-point connection management interface. Please see theGame Kit framework reference.
iAd.framework 4.0 AD Contains classes that display ads in the application. Please see theIAd Framework Reference.
ImageIO.framework 4.0 CG Contains classes that read or write image data. Please see theImage I/O reference set.
IOKit.framework 2.0 N/A Contains the interface used by the device. Do not use this framework directly.
MapKit.framework 3.0 MK Contains classes that embed a map interface into an application and can also be used to find geocoded reverse coordinates. Please see theMap Kit framework reference.
MediaPlayer.framework 2.0 MP Contains an interface for displaying full-screen video. Please see theMedia Player framework reference.
MessageUI.framework 3.0 MF Contains an interface for composing and queuing E-mail messages. Please see theMessage UI framework reference.
MobileCoreServices.framework 3.0 UT Defines the unified type identifiers (UTIs) supported by the system.
OpenAL.framework 2.0 AL Includes OpenAL interfaces. OpenAL is a cross-platform orientation audio library. For more information, please visitwww.openal.org.
OpenGLES.framework 2.0 EAGL,GL Contains OpenGL ES interfaces. OpenGL ES framework is a cross-platform version of OpenGL’s cross-platform 2D and 3D rendering libraries. Please see theOpenGL ES framework reference.
QuartzCore.framework 2.0 CA Contains the Core Animation interface. Please see theQuartz Core framework reference.
QuickLook.framework 4.0 QL Contains preview file interface. Please see theQuick Look framework reference.
Security.framework 2.0 CSSM,Sec Interfaces that contain management certificates, public and private keys, and trust policies. Please see theSecurity Framework Reference.
StoreKit.framework 3.0 SK Contains financial transactions related to in-application purchases. Please see theStore Kit framework reference.
SystemConfiguration.framework 2.0 SC Contains interfaces for handling device network configuration. Please see theSystem Configuration framework reference.
UIKit.framework 2.0 UI Contains classes and methods used by the iOS application user interface layer. Please see theUIKit framework reference.