So, you're a developer, but you have never worked with iOS? In this session, Ardeleanu will provide a head start on how to plan, build, debug and release iOS 7 apps. The talk will cover a wide range of topics, including: the App Store ecosystem; the nature of an app; iOS 7's new UI and how to migrate from iOS 6; interface design; dev tools (Xcode – IDE, Simulator, Instruments – docs, etc); design patterns; debugging and optimisation; App Store and ad-hoc distribution; and what makes an app successfully.
31. Building great apps
‣ Constraints
‣ small size
‣ limited hardware
‣ one screen at a time
‣ one application at a time *
‣ touch input
‣ Interaction
‣ gestures
‣ shake
‣ orientation
‣ audio switch, volume buttons
‣ home & power buttons
33. Application Definition Statement
“A concise, concrete declaration of the app’s
main purpose and its intended audience.”
https://developer.apple.com/library/ios/documentation/
UserExperience/Conceptual/MobileHIG/
34. Solve real problems
"An app must solve a user's problem
clearly and elegantly."
Eric Hope, User Experience Evangelist, Apple
37. What is Storyboarding
‣ Design the “screens” that compose your app => scenes
‣ Visually define the navigation between the scenes => segues
‣ Introduced in: iOS 5 & Xcode 4.2
51. What is Objective C
‣ Thin layer on top of C; strict superset of C
‣ Object-oriented programming language
‣ Inspired by SmallTalk
‣ Developed by Stepstone / NeXT Software / Apple
‣ The development language for Mac OSX & iOS devices
52. Object-Oriented Programming
a programming paradigm that uses "objects"
!
myCar
• Number of wheels
• Number of seats
• Colour
• Engine size
• Top speed
• Drive
• Brake
• Turn Left
• Beep
• Fill with petrol
MethodsProperties
Data + Behaviour
70. id
‣ the generic object type
‣ can be used for object of any type
‣ the object class is determined at runtime (dynamic typing)
Vehicle
*aCar;
Static typing
id
aCar;
Dynamic typing
94. Design Patterns
‣ Accessors Pattern
‣ allows access to an object properties through simple methods
‣Anonymous Type Pattern
‣ send message to objects of an uncertain (at compilation) type
‣2-stage Object Creation Pattern
‣ alloc + init = new
‣ allow custom initialisers
‣Outlets, targets & actions
‣ configuration of and interaction with UI elements
101. Decorator pattern
‣ add bevaviour to an object
‣ without affecting the behaviour of other objects from the same
class
102. Categories
‣ adds functionality to classes without the need to subclass
‣ group common methods and implement them across the
relevant framework
‣ informal protocols (unimplemented methods)
‣ anonymous category (private methods)
103. Delegation
‣ a delegate is an object that works together with its delegator to
solve a problem
‣ a delegate adds/changes the behaviour of the delegator (avoids
subclassing)
‣ loose coupling
‣ a delegate is usually referenced using the anonymous type
@interface MyAppDelegate : NSObject <UIApplicationDelegate>
104. Observer pattern
‣ enables communication between objects
‣ no coupling
‣ one object notifies another object (registered as ‘listener’) when
a change occurs
105. Notifications
‣ an object registers as observer
‣ when a notification is sent to the Notification Center, it is
distributed to all listeners
[NSNotificationCenter
defaultCenter]
118. Facade pattern
‣ simplified interface to a larger body of code
‣ subsystems accessed through a well defined entry point
‣ allows subsystems to change without affecting the overall
functionality
163. Pony Debugger
[16:04:17] paul@Pro2x:project1 [502] $ ponyd serve --listen-interface=127.0.0.1
PonyGateway starting. Listening on 127.0.0.1:9000
[17:14:22] paul@Pro2x:MyPony [516] $ pod install
Setting up CocoaPods master repo
Setup completed (read-only access)
Analyzing dependencies
Downloading dependencies
Installing PonyDebugger (0.3.1)
Installing SocketRocket (0.3.1-beta2)
Generating Pods project
Integrating client project
!
[!] From now on use `MyPony.xcworkspace`.
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to
skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this
message.
190. What is an app?
‣ A package that is installed on a device
‣ Runs in a sandboxed environment
‣ Has limited access to system resources
‣ The limits can change over time
‣ Can retrieve remote information (when connection available)
‣ Can run in background