lunes, 16 de enero de 2012

iOS Development

Introduction

iOS is the operating system at the heart of iPhone, iPod touch, and iPad devices.

iPhone and iPod touch
The iOS platform was built using the knowledge that went into the creation of Mac OS X, and many of the tools and technologies used for development on the platform have their roots in Mac OS X as well. Despite its similarities to Mac OS X, iOS does not require experience developing Mac OS X applications. The iOS Software Development Kit (SDK) provides everything you need to get started creating iOS applications.

Who Should Read This Document

iOS Technology Overview is an introductory guide for anyone who is new to the iOS platform. It provides an overview of the technologies and tools that have an impact on the development process and provides links to relevant documents and other sources of information. You should use this document to do the following:
  • Orient yourself to the iOS platform.
  • Learn about iOS software technologies, why you might want to use them, and when.
  • Learn about development opportunities for the platform.
  • Get tips and guidelines on how to move to iOS from other platforms.
  • Find key documents relating to the technologies you are interested in.
This document does not provide information about user-level system features or about features that have no impact on the software development process.
New developers should find this document useful for getting familiar with iOS. Experienced developers can use it as a road map for exploring specific technologies and development techniques.
Getting the iOS SDK
The iOS SDK contains the tools needed to design, create, debug, and optimize software for iOS. It also contains header files, sample code, and documentation for the platform’s technologies. You can download the iOS SDK from the members area of the iOS Dev Center, which is located at:
http://developer.apple.com/devcenter/ios
For additional information about the tools available for working with Mac OS X and its technologies, see “iOS Developer Tools.”

About iOS Development

iOS is the operating system that runs on iPhone, iPod touch, and iPad devices. This operating system manages the device hardware and provides the technologies required to implement native applications. The operating system also ships with various system applications, such as Phone, Mail, and Safari, that provide standard system services to the user.
The iOS SDK contains the tools and interfaces needed to develop, install, run, and test native applications. Native applications are built using the iOS system frameworks and Objective-C language and run directly on iOS. Unlike web applications, native applications are installed physically on a device and are therefore always available to the user, even when the device is in Airplane mode. They reside next to other system applications and both the application and any user data is synced to the user’s computer through iTunes.

The iOS Architecture

The iOS architecture is similar to the basic architecture found in Mac OS X. At the highest level, iOS acts as an intermediary between the underlying hardware and the applications that appear on the screen, as shown in Figure 1-1. The applications you create rarely talk to the underlying hardware directly. Instead, applications communicate with the hardware through a set of well-defined system interfaces that protect your application from hardware changes. This abstraction makes it easy to write applications that work consistently on devices with different hardware capabilities.
Figure 1-1  Applications layered on top of iOS
High level platform architecture

The implementation of iOS technologies can be viewed as a set of layers, which are shown in Figure 1-2. At the lower layers of the system are the fundamental services and technologies on which all applications rely; higher-level layers contain more sophisticated services and technologies.
Figure 1-2  Layers of iOS
Layers of iOS
As you write your code, you should prefer the use of higher-level frameworks over lower-level frameworks whenever possible. The higher-level frameworks are there to provide object-oriented abstractions for lower-level constructs. These abstractions generally make it much easier to write code because they reduce the amount of code you have to write and encapsulate potentially complex features, such as sockets and threads. Although they abstract out lower-level technologies, they do not mask those technologies from you. The lower-level frameworks are still available for developers who prefer to use them or who want to use aspects of those frameworks that are not exposed by the higher layers.
The technologies and frameworks for each layer are described in later chapters of this document.

What’s in the iOS SDK?

The iOS SDK comes with all of the interfaces, tools, and resources needed to develop iOS applications from your Intel-based Macintosh computer.
Apple delivers most of its system interfaces in special packages called frameworks. A framework is a directory that contains a dynamic shared library and the resources (such as header files, images, helper applications, and so on) needed to support that library. To use frameworks, you link them into your application project just as you would any other shared library. Linking them to your project gives you access to the features of the framework and also lets the development tools know where to find the header files and other framework resources.
In addition to frameworks, Apple also delivers some technologies in the form of standard shared libraries. Because iOS is based on UNIX, many of the technologies that form the lower-levels of the operating system are derived from open source technologies. The interfaces for these technologies are therefore available in the standard library and interface directories.
Some other key components of the SDK include:
  • Xcode Tools—the tools that support iOS application development, including the following key applications:
    • Xcode—an integrated development environment that manages your application projects and lets you edit, compile, run, and debug your code. Xcode integrates with many other tools and is the main application you use during development.
    • Instruments—a runtime performance analysis and debugging tool. You can use Instruments to gather information about your application’s runtime behavior and identify potential problems.
  • iOS Simulator—a Mac OS X application that simulates the iOS technology stack, allowing you to test iOS applications locally on your Intel-based Macintosh computer.
  • iOS Developer Library—the reference and conceptual documentation that teaches you all about iOS technologies and the application-development process. For more information, see “How to Use the Developer Library.”
Although you can run applications in iOS Simulator, Xcode and Instruments also let you run and debug applications directly on an attached device. Simulator is ideal for building and testing applications quickly but is no substitute for testing on a real device. Development on an actual device requires signing up for Apple’s paid iOS Developer Program and configuring a device for development purposes. You can find out more about the iOS Developer Program at the iOS Dev Center.
For information on how to install the iOS SDK and use it for developing iOS applications, see Tools Workflow Guide for iOS.

What Can You Create?

iOS supports the development of two types of applications:
  • Native applications
  • Web applications
The iOS SDK supports the creation of native applications that appear on the device’s Home screen only. It does not support the creation of other types of code, such as drivers, frameworks, or dynamic libraries. If you want to integrate code from a framework or dynamic library into your application, you should link that code statically into your application’s executable file when building your project.
Web applications use a combination of HTML, cascading style sheets (CSS), and JavaScript code to implement interactive applications that live on a web server, are transmitted over the network, and run inside the Safari web browser. Native applications, on the other h.
 

No hay comentarios:

Publicar un comentario

Clima