iphone development overview

36
Are you ready for mobile 2.0? iPhone Development a whirlwind tour of iPhone development Tuesday, 24 March 2009

Upload: tom-adams

Post on 28-Jan-2015

103 views

Category:

Technology


0 download

DESCRIPTION

A whirlwind tour of iPhone development.

TRANSCRIPT

Page 1: iPhone Development Overview

Are you ready for mobile 2.0?

iPhone Development

a whirlwind tour of iPhone development

Tuesday, 24 March 2009

Page 2: iPhone Development Overview

Overview

‣ Introduction

‣ Development Tools

‣ Distribution

‣ Development Practices

Tuesday, 24 March 2009

Page 3: iPhone Development Overview

introduction

Tuesday, 24 March 2009

Page 4: iPhone Development Overview

Who am I?

‣ Tom Adams, CTO & Co-founder, mogeneration

‣ Background in mobile, enterprise, HPC, sem. web, PKI

‣ On the web

‣ http://adams.id.au/blog/

‣ http://twitter.com/tomjadams

‣ http://www.linkedin.com/in/tomjadams

‣ http://github.com/tomjadams

Tuesday, 24 March 2009

Page 5: iPhone Development Overview

mogeneration

‣ Founded September 2008

‣ Keith Ahern, CEO & Co-founder, ex-News Head of Mobile

‣ Offices in Sydney & Brisbane, 4 people, 7 successful projects

‣ iPhone, Android, mobile 2.0 web

‣ Web

‣ http://twitter.com/mogeneration

‣ http://github.com/mogeneration/

Tuesday, 24 March 2009

Page 6: iPhone Development Overview

Our work

‣ Web

‣ The Australian; prior: news.com.au, TrueLocal, moshtix

‣ Released

‣ OzWeather, Moo Shake!, Xumii

‣ Submitted

‣ Lingopal, TrueLocal

‣ In development

‣ Games, books, physics, photography, coupons

Tuesday, 24 March 2009

Page 7: iPhone Development Overview

Tuesday, 24 March 2009

Page 8: iPhone Development Overview

Tuesday, 24 March 2009

Page 9: iPhone Development Overview

Tuesday, 24 March 2009

Page 10: iPhone Development Overview

Tuesday, 24 March 2009

Page 11: iPhone Development Overview

why iPhone?

Tuesday, 24 March 2009

Page 12: iPhone Development Overview

iPhone

‣ What makes the iPhone different?

‣ Cool

‣ Not normal embedded development

‣ Real threading

‣ Real OS

‣ OpenGL

‣ SQL Database

‣ Tool

Tuesday, 24 March 2009

Page 13: iPhone Development Overview

tools

Tuesday, 24 March 2009

Page 14: iPhone Development Overview

Development tools

‣ Xcode

‣ Simulator

‣ Interface Builder

‣ Terminal

‣ Instruments

Tuesday, 24 March 2009

Page 15: iPhone Development Overview

Version control

‣ Built in: SVN, Perforce, CVS

‣ All the cool kids use git

Tuesday, 24 March 2009

Page 16: iPhone Development Overview

Continuous integration

‣ Very important on team projects

‣ Release ad hoc builds to clients

‣ Canonical App Store release

Tuesday, 24 March 2009

Page 17: iPhone Development Overview

Profiling

‣ Rules of profiling

1. Profile2. Find bottlenecks3. Fix4. Profile … repeat …

‣ Instruments

‣ Leaks, memory usage, CPU usage

Tuesday, 24 March 2009

Page 18: iPhone Development Overview

distribution

Tuesday, 24 March 2009

Page 19: iPhone Development Overview

Developer portal

‣ Developer centric

‣ Team, keys, app ids, certificates, provisioning profiles

‣ Be careful of who is an agent!

Tuesday, 24 March 2009

Page 20: iPhone Development Overview

iTunes Connect

‣ Release/distribution centric

‣ Only for team agents

‣ Distribution to app store, sales reporting, tax, etc.

Tuesday, 24 March 2009

Page 21: iPhone Development Overview

practices

Tuesday, 24 March 2009

Page 22: iPhone Development Overview

mogeneration process

‣ Sales

‣ Proposal

‣ Development (iterative)

‣ Outline, brief, loose specification

‣ Interaction design, wireframes

‣ Design, L&F

‣ Iterative development

‣ Handover

Tuesday, 24 March 2009

Page 23: iPhone Development Overview

Project setup

‣ Nomenclature

‣ Project, target, product, frameworks, SDKs, static libraries

‣ Settings belong at a project level

Tuesday, 24 March 2009

Page 24: iPhone Development Overview

Project layout

$(SRCROOT)/ Resources Source/External Source/Main/[Models, Services, Views, …] Source/Test/[Models, Services, Views, …]

Tuesday, 24 March 2009

Page 25: iPhone Development Overview

Code

‣ Objective-C has a weak type system, don’t be too fancy

‣ Strong typing is good

‣ Beware of using id

‣ Good naming is hard with “named” parameters

‣ Code styles guides

‣ “Introduction to Coding Guidelines for Cocoa”, Apple

‣ “Cocoa Style for Objective-C”, Cocoa Dev Central

‣ Google

Tuesday, 24 March 2009

Page 26: iPhone Development Overview

Testing

‣ OCUnit (SenTest)

‣ GTM

‣ GHUnit

‣ UISpec

‣ OCMock

‣ Hamcrest

Tuesday, 24 March 2009

Page 27: iPhone Development Overview

Quality

‣ clang

‣ gcov

‣ CoverStory

Tuesday, 24 March 2009

Page 28: iPhone Development Overview

Threading

‣ Learn to love asynchronicity

‣ Don’t block the main thread

‣ Use notifications to decouple communications

‣ Use an NSOperationQueue to bound # threads

Tuesday, 24 March 2009

Page 29: iPhone Development Overview

Memory management

‣ Retain count

‣ Learn & follow the rules

‣ For each alloc/new/malloc/malloc a release/free

‣ Use autorelease sparingly

‣ new/create/get

‣ Use new autorelease pools in loops, thread, etc.

‣ Beware of collection class rules

Tuesday, 24 March 2009

Page 30: iPhone Development Overview

Gotchas

‣ The iPhone does not support dynamically linked libraries

‣ The simulator uses Mac OS X libraries

‣ Simulator has 72dpi, iPhones have 160dpi

‣ Remember finger sizes!

‣ Don’t use Xcode to manage provision profiles

Tuesday, 24 March 2009

Page 31: iPhone Development Overview

help!

Tuesday, 24 March 2009

Page 32: iPhone Development Overview

Help

‣ iPhone Developer Centre

‣ Stack Overflow

‣ Mobile Orchard (tutorials)

‣ http://cocoadev.com/

‣ http://cocoadevcentral.com/

‣ Google

Tuesday, 24 March 2009

Page 33: iPhone Development Overview

takehome

Tuesday, 24 March 2009

Page 34: iPhone Development Overview

Takehome

‣ iPhone is a great device

‣ Embrace challenges of a limited device

‣ You can still do hardcore tech

Tuesday, 24 March 2009

Page 35: iPhone Development Overview

Projects

‣ FunctionalKit

‣ Motive

Tuesday, 24 March 2009

Page 36: iPhone Development Overview

Contact

Tom Adams

CTO & Co-founder

[email protected]

http://mogeneration.com/

Tuesday, 24 March 2009