Date post: | 25-May-2015 |
Category: |
Documents |
Upload: | juan-luis-buenosvinos |
View: | 436 times |
Download: | 0 times |
1 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
2 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
Introduction to iOS Application Development Architecture overview and development principles Juan Luis Buenosvinos Enterprise Architect [email protected]
3 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
Agenda
• Introduction • iOS History • iOS Architecture • iOS Development • Demo • In Conclusion
4 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
4 EWC REPRESENTATIVES COPY
Introduction
5 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
Introduction Introduction
6 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
6 EWC REPRESENTATIVES COPY
iOS History
7 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS versions > Timeline
iOS 1 iOS 2 iOS 3
iOS 4 iOS 5 iOS 6
8 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 1.0 06 / 2007 iPhone 2G
Core iOS UI Mul4touch gestures
Mobile Safari
iPod
Visual Voicemail
Maps
iTunes Sync
iOS 1.1 09 / 2007 iPhone 2G iTunes Wi-‐Fi Music Store
iPod Touch compa4bility iPod Touch 1st Gen.
9 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 2.0 07/2008
iPhone 3G Na4ve 3rd-‐party apps
App Store
iPhone 2G MicrosoK Exchange support
MobileMe iPod Touch 1st Gen. Contact Search
iOS 2.1 09/2008
iPhone 3G BaOery life and speed fixes
iPhone 2G iTunes Genius playlists
iPod Touch 2nd Gen. Dropped call fixes iPod Touch 1st Gen.
10 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 2.2 11/2008
iPhone 3G Google street view
iPhone 2G Podcast downloads iPod Touch 1st Gen.
iOS 3.0 06/2009
iPhone 3G Cut, copy, paste
Voice Control
iPhone 2G MMS
Spotlight search
iPod Touch 2nd Gen. Push no4fica4ons
USB & Bluetooth tethering
iPod Touch 1st Gen. Landscape keyboard
Find my iPhone
11 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 3.1 09/2009
iPhone 3GS Genius features
iPhone 3G Ringtone downloads
iPhone 2G
iPod Touch 3rd Gen. Remote lock
iPod Touch 2nd Gen. Voice Control over Bluetooth
iPod Touch 1st Gen.
12 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 3.2 04/2010 iPad
Support for iPad resolu4on
New app views for iPad
Loca4on based on Apple data
Bluetooth keyboard support
iBooks
iOS 4.0 06/2012
iPhone 4 Mul4tasking
Home screen folders iPhone 3GS
FaceTime video chat
iPhone 3G Unified email inbox
Threaded email messages iPod Touch 3rd Gen
Re4na Display support iPod Touch 2nd Gen iAd support
13 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 5.0 10/2011
iPhone 4S Siri
iPhone 3GS, No4fica4on Center
iPad PC-‐free
iPad 2 iTunes Wi-‐Fi Sync
iPod Touch 4th Gen, iMessage
iPod Touch 3rd Gen iCloud
14 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS History iOS History > Timeline
Version Released Device Key Func4onality
iOS 6.0 Fall 2012
iPhone 5 Homegrown Maps and turn-‐by-‐turn naviga4on
iPhone 4S Siri enhancements
iPhone 4 Facebook integra4on
iPhone 3GS Passbook
iPad 3 iCloud Tabs
iPad 2 Mail enhancements
iPod Touch 4th Gen FaceTime over cellular
15 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
15 EWC REPRESENTATIVES COPY
iOS Architecture
16 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Architecture iOS Architecture > Introduction
OS X
Cocoa
Media
Core Services
Core OS
iOS
Cocoa Touch
Media
Core Services
Core OS
17 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Architecture iOS Architecture > Core OS
Core OS Manage the virtual memory system, threads, the file system, the network, and inter-‐process communica4on with the frameworks in the Core OS layer. This layer encompasses the kernel environment, drivers, and basic interfaces of iO.
OS X Kernel Mach 3.0 BSD Sockets Security Power Management
Keychain Cer?ficates File System Bonjour
18 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Architecture iOS Architecture > Core Services
Core Services Gain access to fundamental iOS services with the frameworks in the Core Services layer. With these services, access files, low-‐level data types, Bonjour services, network sockets, and more. Use the frameworks in this layer if those in the Cocoa Touch and Media layers aren't sufficient for your needs.
Collec?ons Core Loca?on Address Book Net Services Networking
Threading File Access Preferences SQLite URL u?li?es
19 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Architecture iOS Architecture > Media
Media Create the best mul4media experience available on a mobile device with the frameworks in the Media layer.
Core Audio JPG, PNG, TIFF OpenAL PDF Audio Mixing
Quartz (2D)
Audio Recording
Core Anima?on
Video Playback OpenGL ES
20 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Architecture iOS Architecture > Cocoa Touch
Cocoa Touch Implement a graphical, event-‐driven applica4on in iOS with the frameworks in the Cocoa Touch Layer. In addi4on, use the frameworks in this layer to access key device features, such as user contacts.
Mul?-‐Touch Events
Mul?-‐Touch Controls
Accelerometer View Hierarchy Localiza?on
Alerts Web View People Picker Image Picker Camera
21 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
21 EWC REPRESENTATIVES COPY
iOS Development
22 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
22 EWC REPRESENTATIVES COPY
iOS Development > Key Concepts
23 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Development Key Concepts
Key Element Descrip4on
Tools XCode Interface Builder
Frameworks Founda?on UIKit
Language Objec?ve-‐C
24 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Language > Objective-C
Main Characteris4cs Superset of C (Can be mixed with C and C++)
Single inheritance Categories define behavior across classes
Dynamic run?me Object Messaging
Class Defini?on Proper?es
Enumera?on New Types (Anonymous classes, Class, Selector)
25 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Language > Objective-C
Extension Source Type
.h Header files. Header files contain class, type, func?on, and constant declara?ons.
.m Source files. This is the typical extension used for source files and can contain both Objec?ve-‐C and C code.
.mm
Source files. A source file with this extension can contain C++ code in addi?on to Objec?ve-‐C and C code. This extension should be used only if you actually refer to C++ classes or features from your Objec?ve-‐C code.
26 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Language > Objective-C
27 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Language > Objective-C
28 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Language > Objective-C
29 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Frameworks
30 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Tools > XCode
31 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Key Concepts > Tools > Instruments
32 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
32 EWC REPRESENTATIVES COPY
iOS Development > Introduction
33 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > Anatomy of an iOS Application
Compiled Code (User code + Frameworks)
NIB Files (UI Elements, objects rela?onships,…)
Resources (Images, sounds, …)
Info.plist file (applica?on configura?on)
34 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > iOS Application Runtime Lifecycle
Launch App.
App. Ini?alized
Load Main LIB
Wait for Event
Handle Event Exit App.
35 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > iOS Application Key Components
Single instance of UIApplica2on (Singleton Pa5ern / UIKit Framework)
Orchestrates the lifecycle of an applica?on.
Dispatches events
Manages status bar, applica?on icon badge
Delega?on to perform applica?on-‐specific behavior
36 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > iOS Application Key Components
UIApplica2onDelegate
An object to par?cipate in applica?on lifecycle.
Call implement methods witch UIApplica?on will call.
Manages status bar, applica?on icon badge
37 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > iOS Application Key Components
Info.plist file
Property List describes an applica?on.
Icon appearance, status bar Style, orienta?on,…
Editable on XCode.
38 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > Hello World
39 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > Model View Controller
• The controller subsystem decouples the model and the view.
40 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Introduction > Model View Controller
Layer Descrip4on
Model Model objects encapsulate the data specific to an applica?on and define the logic and computa?on that manipulate and process that data.
View A view object is an object in an applica?on that users can see. A view object knows how to draw itself and can respond to user ac?ons.
Controller
A controller object acts as an intermediary between one or more of an applica?on’s view objects and one or more of its model objects. Controller objects are thus a conduit through which view objects learn about changes in model objects and vice versa.
41 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
41 EWC REPRESENTATIVES COPY
iOS Development > Views and Controllers
42 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC > Organizing Content
43 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC
44 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC > Views
45 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC > Views
46 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC > Creation Views
47 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development MVC > View Controllers and Navigation Controllers
48 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
48 EWC REPRESENTATIVES COPY
Demo
49 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
49 EWC REPRESENTATIVES COPY
iOS Development > Publishing Apps to the App Store
50 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Publishing to App Store
Registra?on Provisioning Get the cer?fica?on
Install the cer?fica?on into XCode
Submit the App.
Apple Valida?on
51 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
iOS Development Publishing to App Store > Registration
52 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
52 EWC REPRESENTATIVES COPY
In Conclusion
53 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential