Introduction to Progamming Applications for the iPhone

19
iPhone Applications Rajasekhar Reddy, Talentica Software

description

 

Transcript of Introduction to Progamming Applications for the iPhone

Page 1: Introduction to Progamming Applications for the iPhone

iPhone Applications

Rajasekhar Reddy, Talentica Software

Page 2: Introduction to Progamming Applications for the iPhone

Agenda Stats about iPhone iPhone Technology See iPhone touch functionality in action Development tools Object-C HelloWorld! App UICatalog – Show UI Controls available in

iPhone Interacting with outside world Loylogic app iPhone app distribution

Page 3: Introduction to Progamming Applications for the iPhone

1 Billion+ Downloads from app store

On average each app got downloaded approximately 29,000 times

Page 4: Introduction to Progamming Applications for the iPhone
Page 5: Introduction to Progamming Applications for the iPhone

Total app downloads 1 billion = 10^9Total iPhones sold 20 Million = 2*10^7Average apps per iPhone = 50

Page 6: Introduction to Progamming Applications for the iPhone

iPhone Technology Multi-Touch Accelerometer Sensors Location Services 3G

Page 7: Introduction to Progamming Applications for the iPhone

iPhone Technology

Multi-TouchWith its large Multi-Touch display and

innovative software, iPhone lets you control everything using only your fingers. How does it work? A panel underneath the display’s glass cover senses your touch using electrical fields. It then transmits that information to an LCD screen below it. The display also features an oil-resistant coating that keeps the iPhone screen clean.

AccelerometeriPhone responds to motion using a built-in accelerometer. When you rotate iPhone from portrait to landscape, the accelerometer detects the movement and changes the display accordingly. The accelerometer also gives you amazing game control.

Page 8: Introduction to Progamming Applications for the iPhone

SensorsWhen you lift iPhone to your ear, the proximity sensor immediately turns off the display to save power and prevent accidental dialing. The ambient light sensor in iPhone automatically brightens the display when you’re in sunlight or a bright room and dims it in darker places.

Location ServicesGPS (Global Positioning System) technology uses information from earth-orbiting satellites to find locations. A-GPS (Assisted GPS) on iPhone 3GS goes a step further, finding the closest satellites to more quickly identify your position. If you’re not within a clear line of sight to a GPS satellite, iPhone finds you via Wi-Fi. If you’re not in range of a Wi-Fi hotspot, iPhone finds you using cellular towers. The size of a location circle tells you how accurately iPhone is able to calculate that location: The smaller the circle, the more accurate the location. iPhone also offers a built-in digital compass that automatically repositions maps to match the direction you’re facing.

Page 9: Introduction to Progamming Applications for the iPhone

Multi touch using simulator Contacts Photos Safari Bookmarks for deleting Saving image from safari Deleting and rearranging spring board

applications Move Me app

Page 10: Introduction to Progamming Applications for the iPhone

Development Tools in the iPhone SDK

Xcode Complete development environment provides

project management, a powerful source editor, and a graphical debugger.

iPhone Simulator Run, test, and debug your application locally on

your Mac using a simulated iPhone. Interface Builder

Interface Builder makes designing a user interface as easy as drag and drop.

Page 11: Introduction to Progamming Applications for the iPhone

Objective-C Objective-C is a superset of the ANSI version of the C

programming language and supports the same basic syntax as C.

File Extensions .h Header files. Header files contain class, type, function,

and constant declarations. .m Source files

Page 12: Introduction to Progamming Applications for the iPhone
Page 13: Introduction to Progamming Applications for the iPhone

Objective-C [myArray insertObject:anObject atIndex:0]; [[myAppObject theArray] insertObject:[myAppObject objectToInsert]

atIndex:0]; Properties

@property BOOL flag; //In header file @synthesize flag; //In Implemantation file

Page 14: Introduction to Progamming Applications for the iPhone

First iPhone Application Design Patterns

Delegation Useful when more than one method is needed

Target-Action Event like situation (button clicked etc..,)

Model-View-Controller Model objects represent data View objects know how to display data and may allow

the user to edit the data. Controller objects mediate between models and views.

Page 15: Introduction to Progamming Applications for the iPhone

Hello World!

Page 16: Introduction to Progamming Applications for the iPhone

UICatalog

Page 17: Introduction to Progamming Applications for the iPhone

Interacting with outside world Web service REST XML Parsing

Only NSXMLParser is available No XmlDocument class where we can do xpath

queries We are using touchXML. It is drop replacement for

NSXMLDocument http://code.google.com/p/touchcode/issues/detail?id=35

Page 18: Introduction to Progamming Applications for the iPhone

LoyLogic app

Page 19: Introduction to Progamming Applications for the iPhone

Distribute your application Join iPhone developer program

Standard program costs $99 Enterprise program costs $250

Ad Hoc Distribution Max 100 devices for Ad Hoc distribution

App Store Distribution