+ All Categories
Home > Documents > Oracle master class_ios_20121019_v1

Oracle master class_ios_20121019_v1

Date post: 25-May-2015
Category:
Upload: juan-luis-buenosvinos
View: 436 times
Download: 0 times
Share this document with a friend
Description:
This document provides a very high introduction to iOS programming. I've started this series to be delivered to my Oracle colleagues :-)
Popular Tags:
53
1 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential
Transcript
Page 1: Oracle master class_ios_20121019_v1

1 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

Page 2: Oracle master class_ios_20121019_v1

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]

Page 3: Oracle master class_ios_20121019_v1

3 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

Agenda

•  Introduction •  iOS History •  iOS Architecture •  iOS Development •  Demo •  In Conclusion

Page 4: Oracle master class_ios_20121019_v1

4 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

4 EWC REPRESENTATIVES COPY

Introduction

Page 5: Oracle master class_ios_20121019_v1

5 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

Introduction Introduction

Page 6: Oracle master class_ios_20121019_v1

6 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

6 EWC REPRESENTATIVES COPY

iOS History

Page 7: Oracle master class_ios_20121019_v1

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  

Page 8: Oracle master class_ios_20121019_v1

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.  

Page 9: Oracle master class_ios_20121019_v1

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.  

Page 10: Oracle master class_ios_20121019_v1

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  

Page 11: Oracle master class_ios_20121019_v1

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.  

Page 12: Oracle master class_ios_20121019_v1

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  

Page 13: Oracle master class_ios_20121019_v1

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  

Page 14: Oracle master class_ios_20121019_v1

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  

Page 15: Oracle master class_ios_20121019_v1

15 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

15 EWC REPRESENTATIVES COPY

iOS Architecture

Page 16: Oracle master class_ios_20121019_v1

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  

Page 17: Oracle master class_ios_20121019_v1

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  

Page 18: Oracle master class_ios_20121019_v1

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  

Page 19: Oracle master class_ios_20121019_v1

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  

Page 20: Oracle master class_ios_20121019_v1

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  

Page 21: Oracle master class_ios_20121019_v1

21 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

21 EWC REPRESENTATIVES COPY

iOS Development

Page 22: Oracle master class_ios_20121019_v1

22 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

22 EWC REPRESENTATIVES COPY

iOS Development > Key Concepts

Page 23: Oracle master class_ios_20121019_v1

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  

Page 24: Oracle master class_ios_20121019_v1

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)  

Page 25: Oracle master class_ios_20121019_v1

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.  

Page 26: Oracle master class_ios_20121019_v1

26 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Language > Objective-C

Page 27: Oracle master class_ios_20121019_v1

27 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Language > Objective-C

Page 28: Oracle master class_ios_20121019_v1

28 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Language > Objective-C

Page 29: Oracle master class_ios_20121019_v1

29 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Frameworks

Page 30: Oracle master class_ios_20121019_v1

30 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Tools > XCode

Page 31: Oracle master class_ios_20121019_v1

31 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Key Concepts > Tools > Instruments

Page 32: Oracle master class_ios_20121019_v1

32 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

32 EWC REPRESENTATIVES COPY

iOS Development > Introduction

Page 33: Oracle master class_ios_20121019_v1

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)  

Page 34: Oracle master class_ios_20121019_v1

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.  

Page 35: Oracle master class_ios_20121019_v1

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  

Page 36: Oracle master class_ios_20121019_v1

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  

Page 37: Oracle master class_ios_20121019_v1

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.  

Page 38: Oracle master class_ios_20121019_v1

38 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Introduction > Hello World

Page 39: Oracle master class_ios_20121019_v1

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.

Page 40: Oracle master class_ios_20121019_v1

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.  

Page 41: Oracle master class_ios_20121019_v1

41 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

41 EWC REPRESENTATIVES COPY

iOS Development > Views and Controllers

Page 42: Oracle master class_ios_20121019_v1

42 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC > Organizing Content

Page 43: Oracle master class_ios_20121019_v1

43 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC

Page 44: Oracle master class_ios_20121019_v1

44 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC > Views

Page 45: Oracle master class_ios_20121019_v1

45 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC > Views

Page 46: Oracle master class_ios_20121019_v1

46 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC > Creation Views

Page 47: Oracle master class_ios_20121019_v1

47 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development MVC > View Controllers and Navigation Controllers

Page 48: Oracle master class_ios_20121019_v1

48 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

48 EWC REPRESENTATIVES COPY

Demo

Page 49: Oracle master class_ios_20121019_v1

49 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

49 EWC REPRESENTATIVES COPY

iOS Development > Publishing Apps to the App Store

Page 50: Oracle master class_ios_20121019_v1

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  

Page 51: Oracle master class_ios_20121019_v1

51 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

iOS Development Publishing to App Store > Registration

Page 52: Oracle master class_ios_20121019_v1

52 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential

52 EWC REPRESENTATIVES COPY

In Conclusion

Page 53: Oracle master class_ios_20121019_v1

53 | © 2012 Oracle Corporation and Mercadona Internal Only – Proprietary and Confidential


Recommended