Iphone OS Architecture

Download Report

Transcript Iphone OS Architecture

Folio3 IPhone Training
Session 1
Presenter: Imam Raza
www.folio3.com
Course Outline
• Session 1
–
–
–
• Session 2
–
• Session 3
–
• Session 4
–
–
–
Iphone development Types
Brief Overview of deployment Strategies
Iphone OS Architecture
Iphone App Testing
Objective-C Intro
The Cocoa Foundation Kit
Graphical User Interface
Windows, Views and Controls.
www.folio3.com
www.folio3.com
IPhone Development Types
There are three development types of Iphone Apps:
• Web based app running in Iphone safari browser.
• IPhone Native apps running natively.
• 3rd party development platform that generate
native apps.
www.folio3.com
www.folio3.com
IPhone web apps development
Below are the system requirement for it:
• Mac machine is not necessary. Any OS/hardware can be
used for it.
• Aptana Studio IDE is used for Iphone web app
developments.
www.folio3.com
www.folio3.com
IPhone Native App development
Below are the System requirements for IPhone
native app development:
• Mac Machine
• Xcode (IDE for developing native Iphone/IPad app
as well as Mac apps).
• Iphone SDK. The latest one is 4.3.
• Iphone Developer account for getting developer
profile certificate to install app on real iphone
device.
www.folio3.com
www.folio3.com
3rd party Native Iphone App Development Solution
Available in market
• MonoTouch
• Rhomobile(write once run anywhere)
• Appcelerator (write once run anywhere)
www.folio3.com
www.folio3.com
App distribution strategies
Adhoc distribution
App Store distribution
Enterprise distribution through local app store
www.folio3.com
www.folio3.com
Iphone OS Architecture
–
–
–
Its similar to the basic architecture of
Mac OSX
IOS acts as an intermediary layer b/w the
underlying hardware and the application
that appears on the screen
Application that we create never interact
with the hardware instead with the iOS.
www.folio3.com
www.folio3.com
MacOSX architecture
www.folio3.com
www.folio3.com
IOS Architecture
www.folio3.com
www.folio3.com
IOS Architecture



In practice, an app can directly call any of the
layers of the stack to perform tasks on the device.
Each operating system layer provides an
increasing level of abstraction away from the
complexity of working with the hardware.
One should, therefore, always look for solutions
located in the higher level OS layers before
writing code that reaches down to the lower level
layers
www.folio3.com
www.folio3.com
Cocoa Touch Layer
Sits at the top of the iPhone OS stack
 Contains the frameworks that are most commonly used by
iPhone application developers.
 Written in objective-C and based on Mac OSX Cocoa API

www.folio3.com
www.folio3.com
Cocoa Touch Layer Frameworks
UIKit Framework
Map Kit Framework
Push Notification Service
Message UI Framework
Address Book UI Framework
GameKit Framework
www.folio3.com
www.folio3.com
Media Layer

Media Layer provide the iPhone OS with :





audio,
video,
animation and
graphics capabilities
Media layer comprises a number of frameworks
that can be utilized when developing iPhone apps.
www.folio3.com
www.folio3.com
Media Layer Frameworks







Core Graphics
Framework(CoreGraphics.framework)
Quartz Core Framework(QuartzCore.framework)
OpenGL ES Framework (OpenGLES.framework)
AV Foundation Framework
(AVFoundation.framework)
Core Audio Frameworks
(CoreAudio.framework,AudioToolbox.framework,A
udioUnit.framework)
Open Audio Library(OpenAL)
Media Player Framework (MediaPlayer.framework)
www.folio3.com
www.folio3.com
Core Services Layer


provides much of the foundation on which the
above layers are built.
Consist of below frameworks:







Address Book Framework
(AddressBook.framework)
Core Data Framework(CoreData.framework)
Core Foundation
Framework(coreFoundation.framework)
Foundation Framework (Foundation.framework)
Core Location
Framework(CoreLocation.framework)
Store Kit Framework(StoreKit.framework)
SQLite Library
www.folio3.com
www.folio3.com
Core OS Layer


The Core OS Layer is the bottom layer of the
iPhone OS stack and sits directly on top of the
device hardware.
The layer provides a variety of services including
low level networking, access to external
accessories and the usual fundamental operating
system services such as memory management, file
system handling and threads.
www.folio3.com
www.folio3.com
Core OS Layer Frameworks




CFNetwork Framework(CFNetwork.framework)
External Accessory
Framework(ExternalAccessory.framework)
Security Framework (Security.framework)
System(LibSystem)
www.folio3.com
www.folio3.com
Iphone Development Tools
www.folio3.com
www.folio3.com
Xcode
–
–
–
–
–
Xcode is an integrated development environment.
Xcode can manage all your testing devices.
Apple makes xcode and distribute it for free. You
can get it from Apple's developer website:
http://developer.apple.com/tools/xcode
Xcode is free but Apple wants you to get register
as a new developer and wants your name and
email address.
www.folio3.com
www.folio3.com
Xcode Snapshot
www.folio3.com
www.folio3.com
Xcode snapshot 2
www.folio3.com
www.folio3.com
Creating Sample Hello World App
Step-1 Starting Xcode

Where I can find xcode after installation?


Macintosh HD -> Developer -> Applications ->
Xcode.
After starting Xcode if you do not see the
welcome screen then go to

Help -> Welcome to Xcode menu option to display
it
www.folio3.com
www.folio3.com
Xcode Startup Screen
www.folio3.com
www.folio3.com
Creating Sample Hello World App
Step-2 Creating New Project


From within this window click on the option to
Create a new Xcode project.
This will display the New Project window where
we are able to select a template matching the
type of project we want to develop
www.folio3.com
www.folio3.com
www.folio3.com
www.folio3.com
Creating Sample Hello World App
Step-3 Choosing Project Template
There are about 6 project templates available to
choose for any iphone project:
 View-based Application
 Navigation-based Application
 Tab Bar Application
 Window-based Application
 Utility Application
 Open GL ES Application
www.folio3.com
www.folio3.com
Creating Sample App
Lab Demonstration
www.folio3.com
www.folio3.com
Q&A
Any?
www.folio3.com
www.folio3.com