Notes from iPhone/iPod Touch Development Seminar

February 5, 2010 by  
Filed under Apple, Conferences, Links and Resources

I attended the Software Development for iPhone and iPod Touch Seminar yesterday, presented by Steve Hayman.

He briefly talked about development for the iPad (which is very similar to iPhone / iPod Touch development), as well as how to create web apps and native apps during the presentation. These are my notes from the session.

The session is described as below:

Please join us for a unique software and web development seminar brought to you by Apple Education.

We’ll discuss and demonstrate Apple’s software development tools for the iPhone and iPod touch, and show how individuals and institutions are building innovative mobile applications for their organizations and the wider world. We’ll highlight and deconstruct some popular applications – both web-based, and native – and show you how to get started building your own with Apple’s free developer tools. We’ll talk about web development with Dashcode, native application development with Xcode and Interface Builder, and review the integration and deployment options and Apple’s developer program. And if the presenter messes up, we may accidentally wind up demonstrating the debugger as well.

iPad Developmemt

iPad apps will use the same tools as iPhone/iPod Touch development, except there will be more screen real estate to work with. There will also be some new objects for developers to work with as well.

Web App vs. Native App

This chart shows the difference tools, languages used, and deployment techniques between web apps and native apps.

  Web Apps Native Apps
Tools Dashcode, iPhone Similator Xcode, Interface Builder, iPhone Similator
Language Html, CSS, Javascript C, C++, Objective-C
Deployment Web Server Direct, Ad-Hoc, Enterprise, App Store

Web-based Apps

Most web apps used the webkit, which is an open source project that takes big webpages and shrink them for the phone.

More info on WebKit:

WebKit is an open source web browser engine. WebKit is also the name of the Mac OS X system framework version of the engine that’s used by Safari, Dashboard, Mail, and many other OS X applications. WebKit’s HTML and JavaScript code began as a branch of the KHTML and KJS libraries from KDE.

Some of the animations and graphics you see on a web apps are using the webkit engine. Samples are the flip transition, the drill-down list, and page turn. HTML5 also allow new animations like the photo gallery browser, gesture events, location-based services, and offline caching. Dashcode is used to easily create web apps.

An example of an offline game that uses only Javascript and CSS is Pie Guy. If you visit this game on your iPhone or iPod Touch, the HTML files will be downloaded to your device. You will be able to play this even in Airplane mode! The line between Web Apps and Native Apps are harder to recognize.

Examples of some very nice mobile University websites to visit on your iPhone/iPod Touch:

Example of using Dashcode

The example that Steve showed us to create using Dashcode was a way to display the Apple Movie Trailers page into a nice mobile-friendly page.

  • Create a new project using Dashcode.
  • Add in a data source – http://apple.com/trailers/home/xml/current.xml (This is a list of all the movies.)
  • Make binding (by dragging a line from the Dashcode object to the field in the data source window.
  • You can get more fancy and display the movie image next to the movie title, etc.

Native Apps

Two students who took the iPhone Development class at Stanford created iStanford (a native app) for their final project. The students started a company called TerriblyClever Design and started designing iPhone apps for Universities (see Duke and UCSD’s iPhone apps). They were then bought out by Blackboard recently.

To create native apps, the tools you will use are Xcode, Interface Builder, Instruments, and the Simulator.

Some of the new frameworks in iPhone 3.0 SDK include the following:

  • Location – apps can now include a Map View UI within the app. Example: ZipCar
  • Peer to Peer – two or more nearby devices can now connect
  • Push Notification – apps can now have badges, alerts, and sound notifications turned on

Other frameworks that were already in previous iPhone SDK:

  • Camera – it’s two lines of code to have your app take a photo.
  • Accelerometer – detects force and motion awareness
  • Location – app can use what location accuracy (geo-location apps)

Native Apps are broken into three parts – Model, View, and Controller.

  • Model – where your data is stored (such as high scores)
  • View – The UI objects / how data is presented on the screen
  • Controller – where most of your coding will take place. The event loops and changes.

For View, Interface Builder is used. For the Controller and Model parts, Xcode is used.

Example: Creating a Flashlight Native iPhone App

If we want the status bar on our window to be hidden, we’d add a line of code in the file appDelgate.m:

  • Create a new project. This will default to a one window app.
  • Make the status bar hidden by adding these lines of code in appDelegate.m:
    [application setStatusBarHidden: YES]
    window.backgroundColor = [UIColor whiteColor];
    
  • Build and Run

Every object is described in two files — a header (file.h) and implementation file (file.m).

To make this flashlight app have an on or off switch, you can add an on/off switch object and make the screen turn black when the switch is toggled.

In the header file, add:

- (IBAction) turnOff:send;

Then drag this header definition to the switch object. This connects (binds) the code to the UI.

In the implementation file, add:

- (IBAction) turnoff:sender
{
     if ([sender isOn] )
          window.backgroundColor = [UIColor whiteColor];
     else
          window..backgroudnColor = [UIColor blackColor];
}

Available iPhone/iPod Touch Development Programs

This chart displays the various programs available, along with its cost and type of deployment.

Program Cost Deploy
Registered Developer
Anybody
Free Simulator Only
Standard
Individuals or Organizations
$99 USD App Store + 100 Phones
Enterprise
500+ Employees, Internal Apps
$299 USD In-House phones
University
200 students/professors
Free 200 Phones

.

Getting Started

Related Products:

iPod Touch 5 Case,iPod Touch 6 Case,SLMY(TM)Heavy Duty High Impact Armor Case Cover Protective Case for Apple iPod touch 5 6th Generation (Deep Blue/Black)iPod Touch 5 Case,iPod Touch 6 Case,SLMY(TM)Heavy Duty High Impact Armor Case Cover Protective Case for Apple iPod touch 5 6th Generation (Deep Blue/Black)Note:
-This case is designed for Apple iPod Touch Gen 5 Gen 6 only. It does NOT fit any other smartphone.
-Accessory only, Apple iPod Touch Gen 5 Gen 6 is not included.
-Package Includes:
-1 x SLMY case for Apple iPod Touch Gen 5 Gen 6
iPod Touch 5 Case,iPod Touch 6 Case,SLMY(TM)Heavy Duty High Impact Armor Case Cover Protective Case for Apple iPod touch 5 6th Generation Black/BlackiPod Touch 5 Case,iPod Touch 6 Case,SLMY(TM)Heavy Duty High Impact Armor Case Cover Protective Case for Apple iPod touch 5 6th Generation Black/BlackNote:
-This case is designed for Apple iPod Touch Gen 5 Gen 6 only. It does NOT fit any other smartphone.
-Accessory only, Apple iPod Touch Gen 5 Gen 6 is not included.
-Package Includes:
-1 x SLMY case for Apple iPod Touch Gen 5 Gen 6.
Apple iPod touch 32GB (5th Generation) - Space Gray (Certified Refurbished)Apple iPod touch 32GB (5th Generation) - Space Gray (Certified Refurbished)iPod touch features a 6-mm ultrathin design and brilliant, 4-inch Retina display. Discover music, movies, and more from the iTunes Store, or browse ap... Read More >
Related Posts Plugin for WordPress, Blogger...
  • joshhighland

    Sounds like it was a good seminar. Thank you for sharing your notes. Once of the fields of iPhone application development that has been interesting me are hybrid native and web apps. It is possible to have a UIViewController that contains a UIWebView. The webview acts like a browser and can connect to a website. If coded properly with css, the user will not know that you are connecting to a website. The Gowalla application is a very good example of this.

  • http://php-princess.net Daynah

    I had no idea Gowalla was a hybrid iPhone app! Thanks for sharing your comments Josh. I'm interested in hearing more as I start to develop my first iPhone apps. :)

  • Matt

    WebKit is actually an opensource framework that is pre-supporting many HTML 5 elements. The kit is used by Firefox, Chrome, Safari, and mobile Safari if memory serves. It let's you do many things that we have had to traditionally use images for such as rounded corners and drop shadows. It pretty much as usual just leaves IE as odd man out.

  • http://php-princess.net Daynah

    Thanks for the correction Matt. :)