apple and ios appeared on june 2007apm/cmsw/docs/12introios_print.pdfgeneral architecture tools...

3
General Architecture Tools Apple and iOS iPhone Appeared on June 2007 OS named iPhone OS 1 First SDK appeared in March 2008 OS and SDK renamed to iOS 4 on June 2010 Multi-touch display, with gesture recognition Sensors (3-axis accelerometer, proximity, light) Camera (2 Mpixel) 3.5” 18 bit 320x480 2:3 aspect and 163 ppi display Rich audio and video Wireless comms GSM / GPRS / EDGE Wi-Fi and Bluetooth iOS Architecture 2 General Characteristics iOS Architecture 3 iOS Operating System 2001 1996 1970 1977 1988 1997 1982 1991 1986 1981 2007 Bell Labs UNIX Berkeley UNIX (BSD) OpenBSD NeXTStep Darwin Mac OS X iOS GNU Minix Linux Commercial UNIXes (HP-UX, AIX, Solaris, IRIX, …) Android 2008 iOS and Hardware iOS Architecture 4 iOS supplies the API’s needed to develop the final user applications and some system applications Those API’s are layered. iOS itself can be considered as the intermediary between the applications and the hardware and other components present in the device In the first versions only one application can use the screen and interact with the user.

Upload: others

Post on 20-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Apple and iOS Appeared on June 2007apm/CMSW/docs/12IntroIOS_print.pdfGeneral Architecture Tools Apple and iOS iPhone Appeared on June 2007 OS named iPhone OS 1 First SDK appeared in

GeneralArchitecture

Tools

Apple and iOS iPhoneAppeared on June 2007 OS named iPhone OS 1 First SDK appeared in March 2008

OS and SDK renamed to iOS 4 on June 2010Multi-touch display, with gesture recognitionSensors (3-axis accelerometer, proximity, light)Camera (2 Mpixel) 3.5” 18 bit 320x480 2:3 aspect and 163 ppi displayRich audio and videoWireless comms GSM / GPRS / EDGEWi-Fi and Bluetooth

iOS Architecture 2

General Characteristics

iOS Architecture 3

iOS Operating System

2001

1996

1970

1977

19881997

1982

1991

1986

1981

2007

Bell Labs UNIX

Berkeley UNIX (BSD)

OpenBSD

NeXTStep

Darwin

Mac OS X

iOSGNU

Minix

Linux

Commercial UNIXes (HP-UX, AIX, Solaris, IRIX, …)

Android

2008

iOS and Hardware

iOS Architecture 4

iOS supplies the API’s needed todevelop the final user applicationsand some system applications

Those API’s are layered.

iOS itself can be considered as theintermediary between the applicationsand the hardware and other componentspresent in the device

In the first versions only one applicationcan use the screen and interact withthe user.

Page 2: Apple and iOS Appeared on June 2007apm/CMSW/docs/12IntroIOS_print.pdfGeneral Architecture Tools Apple and iOS iPhone Appeared on June 2007 OS named iPhone OS 1 First SDK appeared in

Layers of iOS APIs

iOS Architecture 5

Hardware

DriversDevice

iOS

Cocoa TouchUIKit: app integration, windows and graphics, event-handling,views and controls, web and text, access to sensors, cameraand photo library, device info

AddressbookCore Location

MediaGraphics: Quartz, animation, OpenGL ESAudioVideo

Core ServicesCore Foundation: collections, application bundle, data & time,raw data, preferences, URL, streams, port & sockets comms

CFNetwork: BSD sockets, FTP & HTTP protocols, Bonjour,DNS, SSL, TLS

Security: Certificates and keys, random numbers, keychainSQLiteXML: parser and transformations

Core OS - LibSystemthreads, networking, files, standard I/O, memory, math

Standard App Structure

iOS Architecture 6

Use the MVC pattern

XcodeSource editor Interface builder iOS simulatorDevelopment languages Objective-C (in the process of deprecation) Swift

Testing with XCTest (API for unit tests)Static and dynamic analysis

iOS Architecture 7

Development IDE Screen specification

iOS Architecture 8

Main.storyboard

A storyboard

Page 3: Apple and iOS Appeared on June 2007apm/CMSW/docs/12IntroIOS_print.pdfGeneral Architecture Tools Apple and iOS iPhone Appeared on June 2007 OS named iPhone OS 1 First SDK appeared in

The controller

iOS Architecture 9

////  AppDelegate.swift//  Control Fun

import UIKit

@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate { 

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) ‐> Bool { 

// Override point for customization after application launch.return true    }

func applicationWillResignActive(application: UIApplication) {}func applicationDidEnterBackground(application: UIApplication) {}func applicationWillEnterForeground(application: UIApplication) { }func applicationDidBecomeActive(application: UIApplication) {}func applicationWillTerminate(application: UIApplication) { }

}

The ViewController

iOS Architecture 10

ViewController.swift@IBOutlet

Represents an object in theinterface builder

@IBAction

Handlers of events generated onthe interface objects