echo-o & iPhone App Dev - BarCamp Saigon 1

13
by Tran Nhuan Quang @ Multinc with guidance from Huy Zing BarCamp Saigon 1 November 15, 2008

description

For BarCamp Saigon 1, Multinc describes their experiences developing an iPhone app for http://echo-o.comAlso see the accompanying presentation "iPhone & Android App Dev - BarCamp Saigon 1"

Transcript of echo-o & iPhone App Dev - BarCamp Saigon 1

Page 1: echo-o & iPhone App Dev - BarCamp Saigon 1

by Tran Nhuan Quang @ Multincwith guidance from Huy Zing

BarCamp Saigon 1November 15, 2008

Page 2: echo-o & iPhone App Dev - BarCamp Saigon 1

Features on the iPhone clientRedesigned UI for mobile

Sound alerts and vibrations on incoming questions

Page 3: echo-o & iPhone App Dev - BarCamp Saigon 1

Echo-o on iPhone Simulation

Page 4: echo-o & iPhone App Dev - BarCamp Saigon 1

iPhone development toolsMac OS 10.5.4+iPhone SDK 2.1 (current version)An Iphone

Page 5: echo-o & iPhone App Dev - BarCamp Saigon 1

Things that need to knowHow to use XcodeHow to use C/Objective-CAnd the iPhone APIs

Page 6: echo-o & iPhone App Dev - BarCamp Saigon 1

Application StructureMVC structure

Model: classes that deal with data Eg. Data stores

View: classes that contain the UI components Eg. Web component, images, etc.

Controller: classes that deal with the actions Eg. A react to an event, etc

Page 7: echo-o & iPhone App Dev - BarCamp Saigon 1

The project bundle

Page 8: echo-o & iPhone App Dev - BarCamp Saigon 1

Different way to create viewsManually create views by inherit the UIView

class

Use Interface Builder: drag & drop UI components

Page 9: echo-o & iPhone App Dev - BarCamp Saigon 1

Interface Builder

Page 10: echo-o & iPhone App Dev - BarCamp Saigon 1

Example codePlaying a sound file

SystemSoundID mySSID;soundURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault,

CFSTR ("asoundfile.aif"), kCFURLPOSIXPathStyle, FALSE);

// create the system sound IDAudioServicesCreateSystemSoundID (soundURL, &mySSID);

// play the sound fileAudioServicesPlaySystemSound (mySSID);

// vibrate the phoneAudioServicesPlaySystemSound(kSystemSoundID_Vibrate);

Page 11: echo-o & iPhone App Dev - BarCamp Saigon 1

Testing & DeploymentMembership cost of $99-$299 is required

A jail broken iPhone with some “magic” tricks

Page 12: echo-o & iPhone App Dev - BarCamp Saigon 1

Running an app on an jail broken iPhoneCopy the application over the iPhone

/Applications directory

Install ldid from Cydia

Fake a digital signatureldid -S /Applications/MyApp.app/MyApp

Change the modechmod +x /Applications/MyApp.app/MyApp

Page 13: echo-o & iPhone App Dev - BarCamp Saigon 1

http://multinc.com/http://developer.apple.com/iphone/