iPhone Programming - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

iPhone Programming

Description:

iPhone OS provides a set of interfaces for accessing many low-level features of ... iPhone and iPod touch have 3 accelerometers to measure changes along each of the ... – PowerPoint PPT presentation

Number of Views:1191
Avg rating:3.0/5.0
Slides: 25
Provided by: aru4
Category:

less

Transcript and Presenter's Notes

Title: iPhone Programming


1
iPhone Programming
  • Speaker Arun Chhetri

2
What is iPhone
  • Smart Phone by Apple.
  • Why is iPhone an iPhone, not just Phone ??????
  • Built in Accelerometer
  • GPS or Position Triangulation
  • Multi Touch Interface
  • Sensors
  • Keyboard
  • Safari
  • Mail
  • Calendar
  • Wide Screen Display
  • I think biggest in the market

3
What do u need to Program for iPhone
  • To buy MAC

4
iPhone Overview
  • Smart Phone
  • iPod (Widescreen)
  • Wireless Internet Communication Device
  • Wifi 802.11 b/g
  • PDA
  • Computer (OS X)
  • Camera
  • Multi-Touch interface
  • GPS
  • App Store

5
iPhone Development
  • Development done with the help of iPhone SDK
  • Uses Objective-C
  • IDE XCODE
  • Only push your application through App Store
  • 99 membership
  • Review of your application
  • Code also
  • 70 and 30 share.

6
iPhone SDK
  • iPhone Sdk have five powerful tools to do iPhone
    programming.
  • XCODE
  • Professional text editor
  • Debugger
  • GCC compiler
  • Interface Builder
  • For creating user interface
  • Instruments
  • For optimizing application
  • Dash Code
  • For creating web applications for Safari
  • iPhone Simulator

7
Things to consider before programming
  • Low resources
  • 128 mb Ram
  • Limited Battery life
  • Application should take less execution time.
  • Exceptional Handling
  • Multi Touch Events

8
iPhone OS overview and Technologies
  • iPhone Os can be viewed as set of layers

9
Cocoa Touch Layer
  • The Cocoa Touch layer comprises the UIKit and
    Foundation frameworks (UIKit.framework and
    Foundation.framework), which provide the basic
    tools and infrastructure you need to implement
    graphical, event-driven applications in iPhone OS
  • iPhone OS uses this layer to implement features
  • Application management
  • Graphics and windowing support
  • Event-handling support
  • User interface management
  • Objects representing the standard system views
    and controls
  • Support for text and web content
  • Accelerometer data
  • The built-in camera
  • The users photo library
  • Device-specific information

10
Media Layer
  • The Media layer provides graphics and media
    technologies in iPhone OS that are geared toward
    creating most advanced multimedia experience on a
    mobile device
  • Graphics Technologies
  • technologies to do your 2D and 3D drawing
  • OpenGLES.framework (OpenGL), EAGL.framework,
    QuartzCore.framework (Core Animation), Core-
    Graphics.framework (Quartz)
  • Core Audio
  • Native support for audio is provided by the Core
    Audio family of frameworks
  • CoreAudio.framework (audio type and file info),
    AudioToolbox.framework (playback and recording),
    AudioUnit.framework (audio processing)
  • OpenAL
  • The Open Audio Library (OpenAL) interface is a
    cross-platform standard for delivering 3D audio
    in applications
  • Video Technologies
  • iPhone OS provides support for full-screen video
    playback through the Media Player framework
    (MediaPlayer.framework)
  • supports the playback of movie files with the
    .mov, .mp4, .m4v, and .3gp filename extensions

11
Core Services
  • The Core Services layer provides the fundamental
    system services that all applications use
  • Address Book
  • AddressBook.framework provides programmatic
    access to the contacts stored on a users device
  • AddressBookUI.framework complements the Address
    Book framework by providing a graphical interface
    for accessing the users contacts
  • Core Location
  • CoreLocation.framework lets you determine the
    current latitude and longitude of a device
  • CFNetwork
  • CFNetwork.framework high-performance, C-based
    framework that provides a set of object-oriented
    abstractions for working with network protocols,
    for tasks such as communicating with FTP and HTTP
    servers or resolving DNS hosts
  • Security
  • Security.framework provides interfaces for
    managing certificates, public and private keys,
    and trust policies
  • SQLite
  • The SQLite library lets you embed a lightweight
    SQL database into your application without
    running a separate remote database server process
  • From your application, you can create local
    database files and manage the tables and records
    in those files

12
Core OS
  • The Core OS layer encompasses the kernel
    environment, drivers, and basic interfaces of the
    operating system
  • 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
  • Threading (POSIX threads)
  • Networking (BSD sockets)
  • File-system access
  • Standard I/O
  • Bonjour and DNS services
  • Locale information
  • Memory allocation

13
iPhone Hardware and Software features that can be
incorporated in applications
  • Accelerometer
  • 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
  • The system uses the accelerometers to monitor a
    devices current orientation and to notify
    applications when that orientation changes
  • Applications that want to access the
    accelerometer data directly can also do so using
    UIKit

14
iPhone Hardware and Software features that can be
incorporated in applications
  • Core Location
  • The Core Location framework monitors signals
    coming from cell phone towers and Wi-Fi hotspots
    and uses them to triangulate the users current
    position
  • You can specify the desired accuracy of the
    location information, and threshold for reporting
    changes in the current location
  • Use this framework judiciously to not drain the
    users battery

15
iPhone Hardware and Software features that can be
incorporated in applications
  • Contacts
  • The Phone, Mail, and SMS Text applications use
    users list of contacts to identify people the
    user needs to contact and to facilitate basic
    interactions such as starting a phone call,
    email, or text message
  • Your own applications can access this list of
    contacts for similar purposes or to get other
    information relevant to your applications needs
  • You can access the users contact information
    using the Address Book UI framework

16
iPhone Hardware and Software features that can be
incorporated in applications
  • The Camera and Photo Library
  • iPhone has an inbuilt camera as well as a
    centralized photo library whereas iPod Touch
    doesnt have a camera
  • iPhone OS provides access to both of these
    features through classes in the UIKit framework
  • You can incorporate system-provided picker
    interfaces into your application
  • These interfaces provide standard system views
    for selecting a photo from the users photo
    library or taking a picture using the camera

17
Styles of Programming for iPhone
  • iPhone OS defines three basic styles for
    applications
  • Productivity style
  • Utility style
  • Immersive style

18
Productive Style
  • Productivity Applications
  • The focus is on the organization and manipulation
    of detailed information
  • Information is usually text-based, but may also
    be image based if the content is more visually
    oriented
  • Tend to be use multiple screens and make use of
    system controls to handle the navigation from
    screen to screen
  • 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
  • Example The Settings application

19
Utility Style
  • Utility Applications
  • Perform a targeted task that requires relatively
    little user input
  • A quick summary of information or a simple task
    on a small number of objects
  • Interface should be a visually appealing and
    uncluttered to make it easier to spot the needed
    information quickly
  • Use of appropriate graphics to have a pleasing
    visual appearance
  • Examples Weather and Stocks applications

20
Immersive Application
  • Immersive Applications
  • Offer a full-screen, visually rich environment
    thats focused on the content and the users
    experience with that content
  • Commonly used for implementing games and
    multimedia-centric applications
  • Often present custom interfaces, and relies less
    on standard system views and controls
  • Typically use OpenGL ES to draw content, because
    it provides good performance for full-screen
    content at high frame rates
  • Example Media Player application

21
Our Project
  • iRobotController
  • Control Remote Devices through iPhone.
  • Remote Device has a CAM which relays live stream
    to iPhone

22
iRobotController
  • On Remote Device Side
  • Install linux on the remote device.
  • Write Device Controller.
  • Written in Python.
  • Make an ad-hoc network on that device that has to
    be controlled.
  • Write a demon on remote device that listen to
    particular port for e.g. 7080.
  • Receives XML, parse it and get the command, then
    execute the command.
  • Capture live video through cam and then relay it
    to iPhone.

23
iRobotController
  • On iPhone Side
  • Connect iPhone to the ad-hoc network.
  • Get the Accelerometer and touch interface
    readings.
  • Create XML, and send to that particular remote
    device.
  • Receives live stream and then display it on
    screen.

24
Thanks
Write a Comment
User Comments (0)
About PowerShow.com