Absolute Beginners Guide to iPhone dev

31
iPhone Development Absolute beginners guide to... Barry Ezell

description

Slides for presentation given by Barry Ezell to the Suncoast iPhone App Developer's Meetup for August 2000.

Transcript of Absolute Beginners Guide to iPhone dev

Page 1: Absolute Beginners Guide to iPhone dev

iPhone DevelopmentAbsolute beginners guide to...

Barry Ezell

Page 2: Absolute Beginners Guide to iPhone dev
Page 3: Absolute Beginners Guide to iPhone dev

September 26th - Dev Day

USF College of Business

September 27th - Media Day

Technology Unconference

http://barcamptampabay.com

Page 4: Absolute Beginners Guide to iPhone dev

• Intro to the Intro

• What you need: Hardware

• What you need: Software

• What you need: Wetware

• Code!

• Submit

Page 5: Absolute Beginners Guide to iPhone dev

All about me

• Ruby, C#, Erlang

• iPhone beginning 3/2009

• One app in store (SuccessIts)

• One submitted (Bookmark, bookmarkapp.com)

• Several in works

Page 6: Absolute Beginners Guide to iPhone dev

You don’t have to be a fanboy

• Accelerometer, camera, video, magnetometer, iPod, touch, OpenGL

• Over 37M units sold (4/2009)

• Over 1.5B app downloads

• $2.4B a year in sales

Page 7: Absolute Beginners Guide to iPhone dev

Pros

• Controlled, predictable platform

• 320x480 px

• Good documentation

• Apple handles sales

Page 8: Absolute Beginners Guide to iPhone dev

Cons

• All Apple all the time

• Their hardware

• They approve / reject apps

• No alternative app store

• You can use any language as long as it’s Objective-C

Page 9: Absolute Beginners Guide to iPhone dev

WYN: Hardware

• Intel-based Mac running Leopard or S.L.

• iPhone / iPod Touch

Page 10: Absolute Beginners Guide to iPhone dev

WYN: Software

Page 11: Absolute Beginners Guide to iPhone dev

XCode et al.

• XCode 3.x and Instruments on install disk under “Optional Installs”

• Download iPhone SDK, simulator from Apple (after joining dev program)

• All free

Page 12: Absolute Beginners Guide to iPhone dev

Registered iPhone Developer Programhttp://developer.apple.com/iphone/

Free Test using the simulator, no sales

Standard ($99/yr) Test on devices, unlimited sales in App Store

Enterprise ($299/yr) Unlimited in-house distribution, no App Store sales

Page 13: Absolute Beginners Guide to iPhone dev

WYN: Wetware

• Learn Objective-C

• Learn Cocoa Touch, Frameworks

Page 14: Absolute Beginners Guide to iPhone dev

Objective-C

Square brackets represent!

Page 15: Absolute Beginners Guide to iPhone dev

• OO, strict superset of C, inspired by Smalltalk messaging

• Any valid C or C++ code works

• You handle memory management

• [object retain];

• [object release];

Page 16: Absolute Beginners Guide to iPhone dev

• Objects are passed messages with descriptive arguments

Messaging

coyote.hunt(roadRunner,rocketSkates,true);

Page 17: Absolute Beginners Guide to iPhone dev

• Apple’s Object-Oriented Programming with Objective-C http://bit.ly/13QlgA

• Peepcode screencast series: Objective-C for Rubyists

• Programming in Objective-C 2.0 by Stephen G. Kochan

Resources

Page 18: Absolute Beginners Guide to iPhone dev

Cocoa Touch

• Desktop Cocoa adapted for the iPhone

• Frameworks:

• UIKit (touch, windowing, accelerometer)

• CoreGraphics (Quartz, PDF, animation)

• CoreLocation (GPS)

• MediaPlayer (iPod)

• Many more

Page 19: Absolute Beginners Guide to iPhone dev

Resources

• Pragmatic Programmer: iPhone SDK Development by Bill Dudney

• iPhone Developer’s Cookbook by Erica Sadun

• Interwebs: iphonedevsdk.com, Apple forums, Google

Page 20: Absolute Beginners Guide to iPhone dev

Let’s Code

• Finally!

• TweetCount

• XCode > New Project > Utility Application

Page 21: Absolute Beginners Guide to iPhone dev

One Window, many Views

UITableView

Page 22: Absolute Beginners Guide to iPhone dev

One Window, many Views

UIImageView

UIProgressView

UIButton

UILabel

Page 23: Absolute Beginners Guide to iPhone dev

• Normally both called “nibs”

• “Freeze-dried” objects, interface elements, and relationsips

• Normally single .xib launched at app start

.nib or .xib files

Page 24: Absolute Beginners Guide to iPhone dev

IBOutlet & IBAction

• IBOutlets allow getting and setting properties on objects in IB

• IBActions allow objects to receive events like touches or value changes

Page 25: Absolute Beginners Guide to iPhone dev

Test on Devices

• Simulator != iPhone

• Get Provisioning Profiles and Development Certificates on iPhone Dev Portal

• Make life easier with wildcard naming: com.barryezell.*

Page 26: Absolute Beginners Guide to iPhone dev
Page 27: Absolute Beginners Guide to iPhone dev

• Configure app for device testing

• Change Active SDK to “Device”

• Set Signing Identity under Project > Edit Project Settings

• Set your App ID in info.plist file

Device Testing

Page 28: Absolute Beginners Guide to iPhone dev

• Set Release configuration

• Set App Store Signing Identity

• Add artwork (57x57, 512x512 icons)

• Compile and zip with 57x57 icon

Submit to Apple

Page 29: Absolute Beginners Guide to iPhone dev

Upload to iTunes Connect

Page 30: Absolute Beginners Guide to iPhone dev

Tips while waiting on Apple

• Avoid cracks in sidewalk

• Ditto walking under ladders

• Try to forget you ever invested all that time