0
iPhone Programming Speaker Shashank Garg
What is iPhone <ul><li>Smart Phone by Apple. </li></ul><ul><li>Why is iPhone an iPhone, not just Phone ?????? </li></ul><u...
What do u need to Program for iPhone <ul><li>Intel-based Macintosh running Leopard(OS X 10.5.3 or later). </li></ul>
iPhone Development <ul><li>Development done with the help of iPhone SDK </li></ul><ul><li>Uses Objective-C </li></ul><ul><...
iPhone SDK <ul><li>iPhone Sdk have five powerful tools to do iPhone programming. </li></ul><ul><li>XCODE </li></ul><ul><ul...
Things to consider before programming <ul><li>Low resources </li></ul><ul><ul><ul><li>128 mb Ram </li></ul></ul></ul><ul><...
iPhone OS overview and Technologies <ul><li>iPhone Os can be viewed as set of layers </li></ul>
Cocoa Touch Layer <ul><li>The  Cocoa Touch layer   comprises  UIKit.framework  and  Foundation.framework </li></ul><ul><li...
Media Layer <ul><li>Graphics Technologies </li></ul><ul><ul><li>OpenGLES.framework  (OpenGL),  </li></ul></ul><ul><ul><li>...
Core Services <ul><li>The Core Services layer provides the fundamental system services that all applications use </li></ul...
Core OS <ul><li>The Core OS layer encompasses the kernel environment, drivers, and basic interfaces of the operating syste...
iPhone Hardware and Software features that can be incorporated in applications <ul><li>Accelerometer </li></ul><ul><ul><li...
iPhone Hardware and Software features that can be incorporated in applications <ul><li>Core Location </li></ul><ul><ul><li...
iPhone Hardware and Software features that can be incorporated in applications <ul><li>Contacts </li></ul><ul><ul><li>You ...
iPhone Hardware and Software features that can be incorporated in applications <ul><li>The Camera and Photo Library </li><...
Styles of Programming for iPhone <ul><li>iPhone OS defines three basic styles for applications: </li></ul><ul><ul><ul><li>...
Productive Style <ul><li>Productivity Applications </li></ul><ul><ul><li>The focus is on the organization and manipulation...
Utility Style  <ul><li>Utility Applications </li></ul><ul><ul><li>Perform a targeted task that requires relatively little ...
Immersive Application <ul><li>Immersive Applications </li></ul><ul><ul><li>Offer a full-screen, visually rich environment ...
Our Project <ul><li>GeoXray </li></ul><ul><ul><ul><li>LocateMe Feature. </li></ul></ul></ul><ul><ul><ul><li>Search POI’s a...
GeoXray <ul><li>Used UIWebkit to display map. </li></ul><ul><li>Frameworks:  </li></ul><ul><ul><ul><li>UIKit </li></ul></u...
GeoXray <ul><li>On iPhone Side </li></ul><ul><li>Connect iPhone to the Geosemble Server. </li></ul><ul><li>Retrieve the Da...
Challenges <ul><li>Objective C, if you are a pure Java programmer  </li></ul><ul><li>One time, only one application is exe...
Questions?
Thanks   Name: Shashank Garg   Email : shashang@usc.edu
Upcoming SlideShare
Loading in...5
×

iPhone Programming

2,685

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,685
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
38
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "iPhone Programming"

  1. 1. iPhone Programming Speaker Shashank Garg
  2. 2. What is iPhone <ul><li>Smart Phone by Apple. </li></ul><ul><li>Why is iPhone an iPhone, not just Phone ?????? </li></ul><ul><ul><ul><li>Built in Accelerometer </li></ul></ul></ul><ul><ul><ul><li>GPS or Position Triangulation </li></ul></ul></ul><ul><ul><ul><li>Multi Touch Interface </li></ul></ul></ul><ul><ul><ul><li>Keyboard </li></ul></ul></ul><ul><ul><ul><li>Safari </li></ul></ul></ul><ul><ul><ul><li>Mail </li></ul></ul></ul><ul><ul><ul><li>Calendar </li></ul></ul></ul><ul><ul><ul><li>Wide Screen Display </li></ul></ul></ul><ul><ul><ul><ul><ul><li>I think biggest in the market </li></ul></ul></ul></ul></ul>
  3. 3. What do u need to Program for iPhone <ul><li>Intel-based Macintosh running Leopard(OS X 10.5.3 or later). </li></ul>
  4. 4. iPhone Development <ul><li>Development done with the help of iPhone SDK </li></ul><ul><li>Uses Objective-C </li></ul><ul><li>IDE XCODE </li></ul><ul><li>Only push your application through App Store </li></ul><ul><ul><ul><li>99 $ membership </li></ul></ul></ul><ul><ul><ul><li>Review of your application </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Code also </li></ul></ul></ul></ul></ul><ul><li>70 % and 30 % share. </li></ul>
  5. 5. iPhone SDK <ul><li>iPhone Sdk have five powerful tools to do iPhone programming. </li></ul><ul><li>XCODE </li></ul><ul><ul><ul><li>Professional text editor </li></ul></ul></ul><ul><ul><ul><li>Debugger </li></ul></ul></ul><ul><ul><ul><li>GCC compiler </li></ul></ul></ul><ul><li>Interface Builder </li></ul><ul><ul><ul><li>For creating user interface </li></ul></ul></ul><ul><li>Instruments </li></ul><ul><ul><ul><li>For optimizing application </li></ul></ul></ul><ul><li>Dash Code </li></ul><ul><ul><ul><li>For creating web applications for Safari </li></ul></ul></ul><ul><li>iPhone Simulator </li></ul>
  6. 6. Things to consider before programming <ul><li>Low resources </li></ul><ul><ul><ul><li>128 mb Ram </li></ul></ul></ul><ul><ul><ul><li>Limited Battery life </li></ul></ul></ul><ul><li>Application should take less execution time. </li></ul><ul><li>Single Window </li></ul><ul><li>Multi Touch Events </li></ul>
  7. 7. iPhone OS overview and Technologies <ul><li>iPhone Os can be viewed as set of layers </li></ul>
  8. 8. Cocoa Touch Layer <ul><li>The Cocoa Touch layer comprises UIKit.framework and Foundation.framework </li></ul><ul><li>iPhone OS uses this layer to implement features: </li></ul><ul><ul><li>Application management </li></ul></ul><ul><ul><li>Event-handling support </li></ul></ul><ul><ul><li>User interface management </li></ul></ul><ul><ul><li>Support for text and web content </li></ul></ul><ul><ul><li>Accelerometer data </li></ul></ul><ul><ul><li>The built-in camera </li></ul></ul>
  9. 9. Media Layer <ul><li>Graphics Technologies </li></ul><ul><ul><li>OpenGLES.framework (OpenGL), </li></ul></ul><ul><ul><li>QuartzCore.framework (Core Animation) </li></ul></ul><ul><li>Core Audio </li></ul><ul><ul><li>CoreAudio.framework , AudioToolbox.framework, AudioUnit.framework (playback and recording, audio processing). </li></ul></ul><ul><li>Video Technologies </li></ul><ul><ul><li>iPhone OS provides support for full-screen video playback through the Media Player framework ( MediaPlayer.framework ) </li></ul></ul>
  10. 10. Core Services <ul><li>The Core Services layer provides the fundamental system services that all applications use </li></ul><ul><li>Address Book </li></ul><ul><ul><li>AddressBook.framework : provides access to the contacts stored on a user’s device </li></ul></ul><ul><li>Core Location </li></ul><ul><ul><li>CoreLocation.framework : lets you determine the current latitude and longitude of a device </li></ul></ul><ul><li>CFNetwork </li></ul><ul><ul><li>CFNetwork.framework : Provides communication with FTP and HTTP servers </li></ul></ul><ul><li>SQLite </li></ul><ul><ul><li>The SQLite library lets you embed a lightweight SQL database into your application </li></ul></ul>
  11. 11. Core OS <ul><li>The Core OS layer encompasses the kernel environment, drivers, and basic interfaces of the operating system </li></ul><ul><li>iPhone OS provides a set of interfaces for accessing many low-level features of the operating system. Your application accesses these features through the LibSystem library. The interfaces are C-based and provide support for the following: </li></ul><ul><ul><li>Threading (POSIX threads) </li></ul></ul><ul><ul><li>Networking (BSD sockets) </li></ul></ul><ul><ul><li>File-system access </li></ul></ul><ul><ul><li>Standard I/O </li></ul></ul><ul><ul><li>Memory allocation </li></ul></ul>
  12. 12. iPhone Hardware and Software features that can be incorporated in applications <ul><li>Accelerometer </li></ul><ul><ul><li>iPhone and iPod touch have 3 accelerometers to measure changes along each of the primary axes in three-dimensional space, which allows you to detect motion in any direction </li></ul></ul><ul><ul><li>Applications that want to access the accelerometer data directly can also do so using UIKit </li></ul></ul>
  13. 13. iPhone Hardware and Software features that can be incorporated in applications <ul><li>Core Location </li></ul><ul><ul><li>The Core Location framework monitors signals coming from cell phone towers and Wi-Fi hotspots and uses them to triangulate the user’s current position </li></ul></ul><ul><ul><li>Use this framework judiciously to not drain the user’s battery </li></ul></ul>
  14. 14. iPhone Hardware and Software features that can be incorporated in applications <ul><li>Contacts </li></ul><ul><ul><li>You can access the user’s contact information using the Address Book UI framework </li></ul></ul>
  15. 15. iPhone Hardware and Software features that can be incorporated in applications <ul><li>The Camera and Photo Library </li></ul><ul><ul><li>iPhone has an inbuilt camera as well as a centralized photo library whereas iPod Touch doesn’t have a camera </li></ul></ul><ul><ul><li>iPhone OS provides access to both of these features through classes in the UIKit framework </li></ul></ul>
  16. 16. Styles of Programming for iPhone <ul><li>iPhone OS defines three basic styles for applications: </li></ul><ul><ul><ul><li>Productivity style </li></ul></ul></ul><ul><ul><ul><li>Utility style </li></ul></ul></ul><ul><ul><ul><li>Immersive style </li></ul></ul></ul>
  17. 17. Productive Style <ul><li>Productivity Applications </li></ul><ul><ul><li>The focus is on the organization and manipulation of detailed information </li></ul></ul><ul><ul><li>Typically rely on system views and controls (text fields, labels, and other data-oriented views) for their presentation and do little or no custom drawing </li></ul></ul><ul><ul><li>Example: The Settings application </li></ul></ul>
  18. 18. Utility Style <ul><li>Utility Applications </li></ul><ul><ul><li>Perform a targeted task that requires relatively little user input </li></ul></ul><ul><ul><li>A quick summary of information or a simple task on a small number of objects </li></ul></ul><ul><ul><li>Examples: Weather and Stocks applications </li></ul></ul>
  19. 19. Immersive Application <ul><li>Immersive Applications </li></ul><ul><ul><li>Offer a full-screen, visually rich environment that’s focused on the content and the user’s experience with that content </li></ul></ul><ul><ul><li>Commonly used for implementing games and multimedia-centric applications </li></ul></ul><ul><ul><li>Example: Media Player application </li></ul></ul>
  20. 20. Our Project <ul><li>GeoXray </li></ul><ul><ul><ul><li>LocateMe Feature. </li></ul></ul></ul><ul><ul><ul><li>Search POI’s around Current Location. </li></ul></ul></ul><ul><ul><ul><li>Fetch Relevant News Articles </li></ul></ul></ul>
  21. 21. GeoXray <ul><li>Used UIWebkit to display map. </li></ul><ul><li>Frameworks: </li></ul><ul><ul><ul><li>UIKit </li></ul></ul></ul><ul><ul><ul><li>Json </li></ul></ul></ul><ul><ul><ul><li>CoreLocation </li></ul></ul></ul><ul><ul><ul><li>MapKit </li></ul></ul></ul><ul><ul><ul><li>Foundation </li></ul></ul></ul>
  22. 22. GeoXray <ul><li>On iPhone Side </li></ul><ul><li>Connect iPhone to the Geosemble Server. </li></ul><ul><li>Retrieve the Data in JSON format. </li></ul><ul><li>Parse the data and populate the map view and the Table Views. </li></ul>
  23. 23. Challenges <ul><li>Objective C, if you are a pure Java programmer </li></ul><ul><li>One time, only one application is executable. </li></ul><ul><li>-State Saving(NSArchiver). </li></ul><ul><li>Memory leaks </li></ul><ul><li>- Use Application tool to Fix Memory Leaks. </li></ul><ul><li>- Use instruments with the code running on the device to </li></ul><ul><li>See how much memory is being used. </li></ul>
  24. 24. Questions?
  25. 25. Thanks Name: Shashank Garg Email : shashang@usc.edu
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×