research weblog of william carter @
division of interactive media
University of Southern California

March 3, 2009

Sketch 4, assignment + sample code

The assignment for Monday is to build something with the iPhone simulator based on the code provided for you below.

This sketch is designed to get you comfortable looking at and editing objective-c code in the XCode environment, so your sketch should show that you've spent considerable time playing around with the code base, and have manipulated it in some distinguishable way.

I'll be in office hours on thursday, and I recommend if you are having troubles, come hang out.

The basic steps to get up and running in XCode are:

• Open XCode in Macintosh HD/Developer/Applications/XCode
• Alternatively, you can download and double click the "BallBounce.xcodeproj" file included below

I've tried to comment the code best I could. It's based on Keith Peters' Gravity Tutorial for iPhone, which is in 5 parts, which can be found here: [1] [2] [3] [4] [5]. Keith goes into quite a bit of detail about some of this stuff, and some of the later tutorials add some things like accelerometer control.

I've also added a bunch of little things to his code, which you can experiment with. Check the rather extensive README.rtf that you can view from within XCode after you open the project.

Download file


have fun!

Posted by will at 3:35 PM | Comments (0)

January 26, 2009

iPhone version of the location/weather example

Here's the iPhone version of the Location updating code we went through with mobile processing today.

Download file

If you understand what was going on with the mobile processing example below, you should be able to understand, at a basic level, what is happening here. I've tried to comment the code extensively, although for you iphone-dev newbies, some of the iphone syntax might be pretty odd. Let me know if you guys have problems with this.

Also: if you need a developer certificate for iPhone, please email me and I will add you to the list.

Posted by will at 9:56 PM | Comments (0)