plist key elements for those final touches
Now that our app is getting closer to submission we’re looking at how to make it a proper, Apple-approvable app.
The biggest thing we noticed off the bat, since we are testing on an iPhone 3G and an iPhone 4 were the resolution differences. We were able to finally produce custom tab icons by making them Black on transparent backgrounds, then the black behaves like an inverse mask. So they aren’t perfect but they are there and allow for tweaking (add existing files to project with your png and then they will show up as an option in the drop down menu in interface builder). Of course they seem gritty and not terribly nice on the iPhone 4 so that will take some reworking. And the size of 48×32 just seems way to big and crowds the Tab.
The Launch screen has proved a hassle. Have you ever tried to take a screen grab of google maps before it loads a map? For one thing, how are we supposed to take a screen shot of the preloading map? It just seems to look grainy. The Apple HIG seems to help with it’s tips on high res graphics but the grid background still looks weird and it’s just a pixel out of place. Frustrating, not the end of the world, but frustrating.
Suppressing the icon shine was necessary to make the icon legible. On the right of the plist’s rows there’s an + tab.
We had to add the following two rows:
Icon already includes gloss effects – true
Launch image – Default.png
Hide UITabview behind subview
As promised, here is the solution for hiding the tabs (or at least for playing a movie fullscreen over every element:
- (void) moviePlayerLoadStateChanged:(NSNotification*)notification
{
// Unless state is unknown, start playback
if ([mp loadState] != MPMovieLoadStateUnknown)
{
// Remove observer
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:MPMoviePlayerLoadStateDidChangeNotification
object:nil];
// When tapping movie, status bar will appear, it shows up
// in portrait mode by default. Set orientation to landscape
[[UIApplication sharedApplication] setStatusBarHidden:TRUE];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
//To ensure it plays over the tabs, set it as a subview to the parentviewcontroller
// Rotate the view for landscape playback
[[[self parentViewController]view] setBounds:CGRectMake(0, 0, 436, 320)];
[[[self parentViewController]view] setCenter:CGPointMake(160, 218)];
[[[self parentViewController]view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];
// Set frame of movie player
[[mp view] setFrame:CGRectMake(0, 0, 480, 320)];
// Add movie player to parent of self (MKMapkit) as subview once it's defined
[[[self parentViewController]view] addSubview:[mp view]];
/*
// Add movie player as subview
//[[self view] addSubview:[mp view]];
*/
// Play the movie
[mp play];
}
}
Notice I’m using the parentViewController view on self. So if self is parent aka the MKMapkit (a subview of UITabview) then parent of self is the parent of parent. Bingo, setting up the view then attaching it to the UITabview will hide the tabs. The only glitch seems to be the button to expand to fullscreen has gone missing, but I wasn’t using it anyways. Perhaps this was something else I did wrong.
MPMoviePlayerController on iOS 4 in MoviePlayer Example Code
http://iphonedevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html
I you are on the Apple developer forum you’ll have noticed this bit of information about the movieplayer example code no longer working out of the box. This crucial bit of information can’t be posted enough times. A noticeable change in te behavior of our app is that the fullscreen movie player no longer expands beyond the subview you create for your new, more versatile movie player. So playing back a movie in tabs leaves you with the tabs. When I work out how to hide the tabs I’ll post it.
iPhone AR (compass based)
iPhone ARKit
I’ve been working with this library now that I have an iPhone 4 to test it on an I’m impressed with the results but I’ll admit my negligence as to how the initial location is determined. It looked to me that it was hard coded to be somewhere in the states, so I’d imagine it wouldn’t be too difficult to implement location manager to give you a location. The next step is to integrate it with our locative media app.
An opensource augmented reality library.
Tentacles: Mobile Media Lab
A big thank you to Michael Longford and his colleagues for demonstrating their project Tentacles at the last workshop:
An interactive controller for the iPhone / iPod and a Processing server that allows on-site visitors to participate in unstructured play (the best kind). Shown here being premiered as an art installation as part of Toronto’s Nuit Blanche. Created by a team led by Geoffrey Shea (Mobile Experience Lab, OCAD), Rob King (Canadian Film Centre Media Lab) and Michael Longford (Mobile Media Lab, York University).
More information at:
http://tentacles.ca/
In the App Store (works with display):
http://itunes.apple.com/ca/app/tentacle/id327790016?mt=8
Physics engine: Box 2D
Thanks to Patricio Davila for contributing this link. The port of the Physics engine for use on the iphone.
Box2d – http://sourceforge.net/projects/box2d/
http://www.handcircus.com/2009/01/15/iphone-port-of-box2d-testbed-now-available/
ofxiPhone: Open Frameworks on the iPhone
Openframeworks Port to iPhone
Port of the popular development environment. What is it?
“
Openframeworks is a c++ library designed to assist the creative process by providing a simple and intuitive framework for experimentation.
The library is designed to work as a general purpose glue, and wraps together several commonly used libraries under a tidy interface: openGL for graphics, rtAudio for audio input and output, freeType for fonts,freeImage for image input and output, quicktime for video playing and sequence grabbing.”
http://www.openframeworks.cc/about
Direct Download for v0.6 (0.61 coming soon):
iphone: x-code / iphone sdk
Cross Platform Development: Phonegap
From phonegap.com:
What is PhoneGap?
PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.
If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android, Palm, Symbian and Blackberry SDKs, PhoneGap is for you.
For a quick introduction to PhoneGap, watch this three-minute video:
External Resources
Hand Picked iPhone Application Development Resources
From the iPhone Toolbox, some handy links to get up to speed quickly…
http://iphonetoolbox.com/news/hand-picked-iphone-application-development-resources/
Welcome…
Welcome to the iPhone Development Workshop Series homepage. Feel free to register and contribute.