Category Archives: iPhone

Simulator Cropping Update

Quoting myself: You may want to extract screenshots from the iPhone simulator, e.g. for submission to the iTunes store. If you take a screenshot of the iPhone simulator’s window (with, say, Cmd-Shift-4 + Space + Left-Click), you end up with … Continue reading

Posted in iPhone | Comments Off

Quickie: URL Form Decoding

Here’s a little utility function I use to decode application/x-www-form-urlencoded strings on the iPhone: – (NSDictionary*)extractArguments:(NSString*)raw { NSArray* args = [raw componentsSeparatedByString:@”&”]; NSMutableDictionary* rv = [NSMutableDictionary dictionaryWithCapacity:[args count]]; for (NSString* sPair in args) { NSArray* aPair = [sPair componentsSeparatedByString:@”=”]; NSString* … Continue reading

Posted in iPhone | Comments Off

NSURL, Trailing Slashes, and OAuth

Here’s a surprisingly important note from the documentation for the NSURL class’ path method: Return Value The path of the URL, unescaped with the stringByReplacingPercentEscapesUsingEncoding: method. If the receiver does not conform to RFC 1808, returns nil. If this URL … Continue reading

Posted in iPhone, Python, Web stuff | Comments Off

OAuth and Export Controls

Reading over the OAuth protocol (RFC 5849), I noticed something a little odd in section 2.1: Since the request results in the transmission of plain text credentials in the HTTP response, the server MUST require the use of a transport-layer … Continue reading

Posted in iPhone, Projects | Comments Off

Directory Monitor

With iOS 4.0, AAPL brought File Sharing to the iPhone. This feature is pretty simple to turn on (basically, you just “[a]dd the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the key to YES“, and … Continue reading

Posted in iPhone | Comments Off

Taipan! Update

Just a quick announcement today: I’ve released (and AAPL has approved) a new version of Taipan! — this version incorporates the classic Apple ][ ship graphics, and an option for faster combat. It’s available in the iTunes App Store. The … Continue reading

Posted in iPhone, Projects | Comments Off

Lite Versions

There’s a bit of a chicken/egg problem with selling an app on iTunes: In the absence of a big marketing push, it’s pretty hard to persuade people to pay for something based only on some ad copy and a few … Continue reading

Posted in iPhone | Comments Off

Masks

I’ve been playing around with Core Graphics/Quartz 2D image masks. They’re pretty neat, but a little obscure. Today I want to share a few things I wish I’d know when I started working with them.

Posted in iPhone | Comments Off

Metadata

Today’s project is another of those oddballs: I’m not really sure it will be interesting to anyone else, and I’m far from confident that I implemented it optimally, but it did solve a real-world problem that cropped up in one … Continue reading

Posted in iPhone | Comments Off

Multitasking Opt-Out

Given just how much of a hassle it can be to support multitasking on the iPhone, it’s worth a quick mention that it’s possible to opt out of the whole thing. All you need do is add this pair to … Continue reading

Posted in iPhone | Comments Off