iOS Development Seminar Keynote

3,379 views

Published on

If you are interested in developing internal apps for your business or have a great idea for a commercial app for the App Store but you are not quite sure about where to get started of what is involved.

Our half day seminar covered the following areas:

how to get started with app development,

where to get resources

as well as offering a ‘taster’ module from our 5 day iOS development course

Published in: Technology, News & Politics
2 Comments
5 Likes
Statistics
Notes
No Downloads
Views
Total views
3,379
On SlideShare
0
From Embeds
0
Number of Embeds
866
Actions
Shares
0
Downloads
1
Comments
2
Likes
5
Embeds 0
No embeds

No notes for slide

iOS Development Seminar Keynote

  1. 1. Minimum SkillsTuesday, 20 March 12
  2. 2. Minimum Skills iPhone SDKTuesday, 20 March 12
  3. 3. Minimum Skills • C, Objective C • Foundation Classes • UIKit • Interface BuilderTuesday, 20 March 12
  4. 4. iOS SDK LayersTuesday, 20 March 12
  5. 5. iOS SDK Layers iPhone SDKTuesday, 20 March 12
  6. 6. What is iPhone SDK? Layered libraries and frameworks Development tools DocumentationTuesday, 20 March 12
  7. 7. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  8. 8. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  9. 9. Core Services Layer Foundation Framework Objective-C wrappers for Core Foundation Core Foundation C Library Strings, dates, collections, threads, etc. Core Location Framework Accessing geospatial positioning info Core Data Framework Persistence, object-relational mapping Address Book Framework Managing contact info SQLite C Library Accessing lightweight SQL database XML Support ObjC Class NSXMLParser class and libXML2 library Store Kit Framework In app purchasingTuesday, 20 March 12
  10. 10. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  11. 11. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  12. 12. Media Core Animation Open GL ES Core Graphics Core AudioTuesday, 20 March 12
  13. 13. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  14. 14. iPhone SDK Cocoa Touch Media Core Services Core OSTuesday, 20 March 12
  15. 15. Cocoa touch AddressBookUI MessageUI MapKit UIKitTuesday, 20 March 12
  16. 16. UIKit • Application management and integration (via URL schemes) • Graphics and windowing • Handling touch events • User interface views and controls • Text handling • Web content • Device-specific features (accelerometer, camera, photo library)Tuesday, 20 March 12
  17. 17. iOS SDK ToolsTuesday, 20 March 12
  18. 18. iOS SDK Tools iPhone SDKTuesday, 20 March 12
  19. 19. XCode • IDE for iPhone Projects • Build • Run (Simulator, device) • Debug • Source code management (SCM) • DocumentationTuesday, 20 March 12
  20. 20. Interface Builder • Was a separate application • Now integrated with Xcode • GUI design tool • Doesnt generate code • Works with ‘Freeze-dried’ objects • Archived in .xib files • Dynamically loaded • Objects deserialized at load timeTuesday, 20 March 12
  21. 21. Instruments • Garage Band-style interface • Performance monitoring • Recording trace data • CPU Sampler • File Activity • Object Allocations • LeaksTuesday, 20 March 12
  22. 22. iOS Simulator • Simulate iPhone/iPad • Set the OS Version • Simulate some hardware features • Rotate, shake, some gestures • Network aware • Home / Lock • ~/Library/Application Support/iPhone SimulatorTuesday, 20 March 12
  23. 23. Anatomy of an ApplicationTuesday, 20 March 12
  24. 24. Anatomy of an Application iPhone SDKTuesday, 20 March 12
  25. 25. Anatomy of an Application • Applications are executed from within a sandbox on the iPhone • A Sandbox is a restricted environment • Prevents applications from accessing unauthorised resources. • Prevents read/write operations outside your applications home folder • Everything your application needs must be self contained.Tuesday, 20 March 12
  26. 26. Applications home directoryTuesday, 20 March 12
  27. 27. Applications home directory • Documents • User created Docs • Not shared with any other application • Library • Application may store preferences • Other resources • Has a default Preferences folder • MyApp.app • Actual application • Directory containing executable and other resourcesTuesday, 20 March 12
  28. 28. Anatomy of an Application • Compiled Code • Your code • Frameworks • Nib files • UI elements and other objects • Details about object relationships • Resources • Images, Sounds, strings etcTuesday, 20 March 12
  29. 29. La un ch ap pTuesday, 20 March 12 A pp in it Lo ad m ai n ni b W ai tf Application Lifecycle or ev en t H an dle ev en t Ex it ap p
  30. 30. iPhone Application Skeleton main() main.m Application MyAppDelegate.h Delegate MyAppDelegate.mTuesday, 20 March 12
  31. 31. iPhone Application Skeleton main() main.m Application MyAppDelegate.h Delegate MyAppDelegate.m MyViewController.h View MyViewController.m Controller MyViewController.xibTuesday, 20 March 12
  32. 32. Model, View, Controller Controller Logic Model View Data Presentation / interactionTuesday, 20 March 12
  33. 33. Model • Manages the app data and state • Not concerned with UI or presentation • Often persists somewhere • Same model should be reusable, unchanged in different interfacesTuesday, 20 March 12
  34. 34. View • Present the model to the user in an appropriate interface • Allows user to manipulate data • Does not store any data • Except to cache state • Easily reusable & configurable to display different dataTuesday, 20 March 12
  35. 35. Controller • Intermediary between Model & View • Updates the view when the model changes • Updates the model when the user manipulates the view • Typically where the app logic livesTuesday, 20 March 12
  36. 36. Model, View, Controller Controller Model ViewTuesday, 20 March 12
  37. 37. UIView • Rectangular region of the screen • Responsibilities • Drawing • Animation • Responding to Events (touches etc) • Parent to other views • Can group other views/objectsTuesday, 20 March 12
  38. 38. UIViewTuesday, 20 March 12
  39. 39. View Coordinate System • Origin in upper left corner • y-axis grows downwards 0,0 +x +yTuesday, 20 March 12
  40. 40. Screen Sizes iPhone iPhone 3G/3GS iPhone 4/4S iPad 1/2 New iPad 480 x 320 960 x 640 1024 x 768 2047 x 1536Tuesday, 20 March 12
  41. 41. App - Icons Size File Name Used For 512 x 512 iTunesArtwork Ad Hoc iTunes 57 x 57 Icon.png Home screen on iPhone/iPod 114 x 114 Icon@2x.png Home screen for iPhone 4 72 x 72 Icon-72.png Home screen for iPad 144 x 144 Icon-72@2x.png Home screen for iPad 3 29 x 29 Icon-Small.png Spotlight and Settings 50 x 50 Icon-Small-50.png Spotlight for iPad compatibility 58 x 58 Icon-Small@2x.png Spotlight and Settings for iPhone 4Tuesday, 20 March 12
  42. 42. Xcode: WorkspaceTuesday, 20 March 12
  43. 43. Xcode: Workspace Navigator areaTuesday, 20 March 12
  44. 44. Xcode: Workspace Navigator Editor area areaTuesday, 20 March 12
  45. 45. Xcode: Workspace Navigator Editor area Utility area areaTuesday, 20 March 12
  46. 46. Xcode: Workspace Navigator Editor area Utility area area Library areaTuesday, 20 March 12
  47. 47. Xcode: Workspace Navigator Editor area Utility area area Library area Debugger areaTuesday, 20 March 12
  48. 48. Xcode: WorkspaceTuesday, 20 March 12
  49. 49. Xcode: Workspace Navigator selector barTuesday, 20 March 12
  50. 50. Xcode: Workspace Navigator Jump Bars selector barTuesday, 20 March 12
  51. 51. Xcode: Workspace Navigator Jump Bars selector bar Inspector Selector barTuesday, 20 March 12
  52. 52. Xcode: Workspace Navigator Jump Bars selector bar Inspector Selector bar Library Selector barTuesday, 20 March 12
  53. 53. Xcode: Workspace Navigator Jump Bars selector bar Inspector Selector bar Library Selector bar Filter barTuesday, 20 March 12
  54. 54. Xcode - Toolbars Toolbar Standard Editor Assistant Editor Version Editor Hide/Show Navigator Hide/Show Debug Hide/Show UtilitiesTuesday, 20 March 12
  55. 55. Xcode - Toolbars Navigators List of files, symbols, search, issues, debug, breakpoint, logs Jump Bar Jump to any location in your project Toolbar Standard Editor Assistant Editor Version Editor Hide/Show Navigator Hide/Show Debug Hide/Show UtilitiesTuesday, 20 March 12
  56. 56. Xcode - Interface Builder Connections Size Inspector Attributes Identity Inspector Quick Help File Inspector DockTuesday, 20 March 12
  57. 57. Xcode - Interface Builder Media Objects Code Snippet File TemplatesTuesday, 20 March 12
  58. 58. Create an Xcode Project • Menu: File > New Project… • Xcode displays project template browser • Select iOS / Application • Various iPhone templates • Click Next…Tuesday, 20 March 12
  59. 59. Basic UI & InteractionTuesday, 20 March 12
  60. 60. Basic UI & Interaction iPhone SDKTuesday, 20 March 12
  61. 61. UIControls User interface classes • Subclass of UIView • Numerous built-in controls • Generates events • Touch up/down • Drag event/exit • value changed • Invokes actions upon eventsTuesday, 20 March 12
  62. 62. Target Action View ControllerTuesday, 20 March 12
  63. 63. Target Action View ControllerTuesday, 20 March 12
  64. 64. Target Action - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  65. 65. Target Action - (IB Out let) Upd ate my Tex t - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  66. 66. Target Action - (IB Out let) Upd ate my Tex t - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  67. 67. Events • View objects that allows users to initiate some type of action • Respond to variety of events • Touch events • touchDown,touchDragged, touchUp(inside, outside) • Value changed • Editing events • editing began, editing changed, editing endedTuesday, 20 March 12
  68. 68. Interface Builder Tags • IBActions • Associate methods (code) to actions in the UI • Run some code when button press etc • IBOutlets • Associate properties in code with objects in UI • Get or set a value of a UI object • Set/Get value of a switch • Set a view’s hidden propertieTuesday, 20 March 12
  69. 69. Target Action View ControllerTuesday, 20 March 12
  70. 70. Target Action View ControllerTuesday, 20 March 12
  71. 71. Target Action - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  72. 72. Target Action - (IB Out let) Upd ate my Tex t - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  73. 73. Target Action - (IB Out let) Upd ate my Tex t - (IBAction)buttonPressed View ControllerTuesday, 20 March 12
  74. 74. Files • Header file contains declarations • variables, methods etc • Method file implementation • Your code goes here • Xib file • The user interface goes hereTuesday, 20 March 12
  75. 75. Linking in Interface Builder Files OwnerTuesday, 20 March 12
  76. 76. Linking in Interface Builder Files OwnerTuesday, 20 March 12
  77. 77. Linking in Interface Builder Files OwnerTuesday, 20 March 12
  78. 78. Demo and ExerciseTuesday, 20 March 12
  79. 79. Demo and Exercise iPhone SDKTuesday, 20 March 12

×