Automatically Generate iPhone/iPad Icons at All Required Sizes

June 18th, 2010 — 4:00pm

With the advent of the iPhone 4 Retina Display, iOS application developers have an even larger task when it comes to creating the various sizes of icons they need for their applications. In summary, here are the icon sizes and where they’re applied:

  1. 57×57 – iPod touch, iPhone, iPhone 3G, iPhone 3GS main screen
  2. 29×29 – iPod touch, iPhone, iPhone 3G, iPhone 3GS app settings and Spotlight, iPad settings
  3. 72×72 – iPad main screen
  4. 50×50 – iPad Spotlight
  5. 72×72 – iPad main screen
  6. 114×114 – iPhone 4 main screen
  7. 58×58 – iPhone 4 settings and Spotlight
  8. 320×320 – iOS documents
  9. 64×64 – iOS documents

You may wish to customize your document icons (e.g., by overlaying your icon on a page icon or somesuch). And of course, iTunes requires that you submit a 512×512 image to be used in the App Store and elsewhere. This is often customized but will likely be similar in style to your primary app icon.

If you’re like me, you don’t have a graphic designer operating at the pixel level to produce sharp, snazzy icons at all those sizes. So instead of tooling around in Photoshop every time you tweak your 512×512 master icon (Image -> Image Size… -> 57px -> Save As… -> Undo -> ad infinitum), why not automate the process?

I’ve put together a small (tiny) XCode project that uses AppKit to output all the icon sizes mentioned above. And it’ll be easy to tweak when the iPad with Retina Display (*fingers crossed*) debuts and needs 96px and 144 px versions of your icon. Throw it into your build system and get freshly-resized icons every time you compile. Grab it here:
Click to download

View Comments | Mac OS X, iPhone

iPhone SDK: Making Your AudioSession Routes Play Nicely with the Vibrate Switch

January 27th, 2010 — 8:07pm

So, you’re writing an awesome multimedia application for the iPhone. Everything’s going swimmingly, and you even have some nice animation effects for when the iPhone is plugged into an external accessory, just like the iPod app:

- (void)toggleVolumeDisplay: (BOOL)show
{
	BOOL isShowing = (volumeSlider.alpha > 0.0);
	if( isShowing && !show )
	{
		// Animate volume slider down and out, while animating play controls to center of view
	}
	else if( !isShowing && show )
	{
		// Animate volume slider in, while animating play controls up to the top of the view
	}
}

Or something like that. That’s purely to illustrate what you might be doing in response to a run-of-the-mill hardware route change (headphones plugged in, connected to speaker dock, etc.), which of course you’re detecting like this:

	// When the view is loaded
	AudioSessionAddPropertyListener( kAudioSessionProperty_AudioRouteChange, RouteChangeListener, (void *)self);

	// Called later as part of your listener callback
	CFStringRef state = nil;
	UInt32 propertySize = sizeof(CFStringRef);
	OSStatus result = AudioSessionGetProperty( kAudioSessionProperty_AudioRoute, &propertySize, &state);
	if( result == kAudioSessionNoError)
	{
		if( CFStringGetLength(state) > 0)
		{
			if ([(NSString *)state compare:@"LineOut"] == NSOrderedSame) // only special case we care about
				shouldShowVolumeControl = NO;
		}
		else
			; // vibrate switch engaged
	}
	else
	{
		if (result == kAudioSessionUnsupportedPropertyError)
			shouldShowVolumeControl = NO; // probably simulator
		else
			; // error encountered
	}

This has been documented in plenty of places.
Continue reading »

View Comments | Programming, iPhone

Push

January 26th, 2010 — 10:42am

For the past year, I’ve been employed by 352 Media Group, based first in Gainesville, FL and then in Atlanta GA.

Recently, I decided that the time had come for me to try to make it as a freelancer. I’m not the kind of person who thinks everyone should follow the path of self-employment. On the other hand, there comes a point in some of our lives where the idea of working for someone else is so distasteful that the inevitable pain and isolation that comes from going it alone is actually attractive. Continue reading »

View Comments | Freelancing

Make Terminal Follow Aliases Like Symlinks

January 9th, 2010 — 3:34pm

Okay, so you’re spelunking around in Mac OS using Terminal. You try to ‘cd’ into a directory only to be told that what you’re trying to get to “is not a directory.” Then you remember that the target directory is actually a shortcut that you created with Finder. It looks just link a symlink in Finder, so shouldn’t it act like one in Terminal?

Unfortunately, in OS X, aliases are treated differently by the command line than symlinks. In particular, they won’t be followed by the “cd” command, leading to your present frustration. Fortunately, with a little elbow grease, you can patch up your shell and be on your merry way. Continue reading »

View Comments | Mac OS X, Unix

Creating Value at Starbucks

October 28th, 2008 — 2:47pm

A recent article by Tom Davenport on the Harvard Business Publishing metablog has me thinking. Entitled “Is Web 2.0 Living on Thin Air?,” the post asks whether all us hipster Starbucks jet-setting metrosapiens are really creating value, or just participating in a “fluffy” game of social media-powered self-delusion. I think it’s the wrong question to ask, but because Davenport implicitly answers another question, this present post is vindicated and the fundamental issue at hand is revealed as both beginning and end. </Helmut “The Architect” Bakaitis>

Concordantly, allow me to ask the question that Davenport really wants to ask: Regardless of the degree of engagement in often frivolous social networking activities (i.e., poke wars, media tagging, and adding edges to the social graph just for the sake of increasing your friend count), who is creating value and in what is that value based?

Speaking as an aspiring coffee shop hipster creative, I can tell you that when I’m sitting down with a Grande Pike Place drip brew, I’m not going to be spending much time on facebook; I’m going to be spending time slicing .PSDs, writing CSS, and scripting PHP and jQuery, or my language du jour.

I remember reading a much more conservative piece by an individual I could only imagine being the type of neo-maxi-zoom-dweebie who could make a career of doling out largely vapid and condescending advice. Substantial Googling and Snopesing turned up Charles J. Sykes and the relevant quotation: “Television is not real life. In real life people actually have to leave the coffee shop and go to jobs.” Surely enough, he’s at it again. Suffice to say, this kind of polemic fails to inspire me. I guess my necktie is a little too loose for me to get the point.

It turns out that it’s possible to create value darn-near anywhere these days. I’m not saying every job is implicitly mobile; vanishingly few are. But for those of us knowledge workers who produce the technology that makes everyone elses’ lives richer and easier, a favorite coffee shop can, as in the vision for Starbucks envisioned by Howard Shultz, provide a comfortable “other place,” a sacred venue away from the distractions of home where, on the best days, everything but the workpiece fades into the background and we’re cruising along in the zone of maximum productivity.

In short, the value we produce takes the form of applications and systems that make it easier for people to do whatever it is they do. So indeed, getting overly engaged in social networking can be a big drain on personal productivity. But we shouldn’t confuse such value-sapping minutiae with the value-creating work of producing sites that encourage engagement, including, yes, the creation of social media sites.

View Comments | Uncategorized

Blog Action Day 08: Moving Slowly on Poverty

October 16th, 2008 — 12:38am

In the last hour or so of the day (on the West Coast, at least), and even though this site is still under very active construction, I wanted to drop a quick post for Blog Action Day ’08. The topic of the year is poverty.

As I am a white Anglo-Saxon male who grew up, if not in, at least adjacent to, the suburbs, most people would assume that my experience with poverty is minimal. They would be correct. I have never known clawing hunger for days on end; have never lacked a roof, four walls and a carpeted floor; have never been the subject of an exposé on wretched conditions in the inner city nor a child with baleful eyes who could get by with a mere 75 cents a day.

No, being in the first world, I like to imagine that I can get by, due to my place of privilege in Maslow’s hierarchy, on just my principles. One of my friends recently posted on facebook a quotation by Protestant minister William J. H. Boetcker, from which I take the following excerpts: “You cannot strengthen the weak by weakening the strong[...]” and “[You] cannot help men permanently by doing for them what they can and should do for themselves.” As much as this sentiment reeks of the hackneyed arguments people make for trickle-down effects between classes, there is something to be taken from it, and it has everything to do with urgency. Continue reading »

View Comments | Global-Reach

Back to top