Tutorial: Disable the iPhone 4′s Front Camera

Wednesday, August 24th, 2011

I’ve been negligent in posting new articles this year, but despite appearances this blog isn’t quite dead yet. I’ll begin regular postings again soon, but in the meantime here’s a link to an article I guest authored over at iCodeBlog:

One option is to replace the standard camera controls with a custom interface, but that’s a whole lot of work if you just want to prevent the user from taking a photo with the front camera. Fortunately there’s another option: put a transparent button over the “switch camera” button, which will intercept touch events and show an alert dialog. It sounds simple, but as you’ll see there are a few tricks to actually getting this to work.

Check out the rest here!

No Comments.

WeatherMin Approved for the Mac App Store!

Sunday, January 30th, 2011

I’m happy to announce the availability of WeatherMin on the Mac App Store! Like most Mac developers who are bringing software to the App Store, this is somewhat of an experiment for me. The Mac App Store is still in its early stages, and although my hopes are high I have no way of telling what the payoff will be or what unexpected issues might come up. For all the downsides though, I want to do my best to reach all my potential customers. It’s clear the App Store is the best way to do this.

For the time being I will continue to distribute WeatherMin through my own FastSpring online store, as well as release free updates with Sparkle. This is certainly more work on my end, but I think it’s the only fair way to treat existing customers who have already purchased a license.

Oh, and as part of the App Store experiment, I’m also lowering the price of WeatherMin. You can get it now for $4.99, either on the Mac App Store or my own online store. Enjoy!

No Comments.

That Blue Bike

Monday, September 6th, 2010

If you’re interested at all in bicycling, take a look at my latest side project this summer. That Blue Bike is a new blog focused on bike commuting and touring. Expect to find product reviews, technical information, and trip reports from some of the bicycling adventures I’ve been on lately.

No Comments.

June / July Link Roundup

Sunday, July 4th, 2010

Cocoa developer Matt Gemmell tells us why our application’s website sucks. I admit to making some of these mistakes in the past, although I think I fixed most of them in my most recent set of updates.

Alexander Repty released a PDF reader for iPad, Folio Case, right around the time Apple announced PDF support in iBooks. Alexander has written a lot about his experience on his blog and Twitter, and it’s an interesting story to read.

Speaking of iBooks, if you’re looking for free content in .epub format there’s nothing better than The Pragmatic Bookshelf.

Dave Caolo’s new Apple blog, 52 Tigers, has a great post about the small changes in iOS 4 you may have missed.

No Comments.

WeatherMin 1.0 Released!

Thursday, June 10th, 2010

For the past few months I’ve been working on a side project which I’m happy to announce is finally complete. WeatherMin 1.0 is a simple application for Mac OS X 10.6 that displays the current weather conditions on your desktop. WeatherMin comes with five great looking themes, different notification options, and takes advantage of new technologies in Snow Leopard such as Core Location to automatically determine your current position.

To celebrate the launch I’m offering WeatherMin for 50% off, less than five bucks! Click here to buy, and enter the coupon code INTRO during checkout. This coupon is valid until June 24th, 2010.

There’s much to come in the future too. I already have several major improvements in mind, and with each release I’ll be adding new themes and additional features. Don’t hesitate to email me if there’s anything you’d like to see in the next version!

No Comments.

Safari 5 Extensions

Wednesday, June 9th, 2010

Safari Extensions is a Tumblr blog featuring Extensions for the just-released Safari 5 browser.

It seems like the Safari developer community has exploded overnight. Just a few days after Safari 5 has been released and there are already dozens (soon to be hundreds) of useful extensions out there. It’s already changed the way I use Safari, and I can’t wait to see what else is on the way.

No Comments.

Restart your Cocoa application using Sparkle

Thursday, June 3rd, 2010

It’s not uncommon for an OS X application to need to restart itself in certain unavoidable situations, such as hiding the dock icon. Most of the solutions you’ll find on the Internet rely on a command line helper app that waits for the parent application to finish exiting before launching it again. Although this isn’t hard to implement yourself, chances are you already have everything you need, buried inside the Sparkle framework.

Based on the Sparkle source code, here’s a quick way to restart any application that includes the Sparkle framework.

NSString *launcherSource = [[NSBundle bundleForClass:[SUUpdater class]]  pathForResource:@"relaunch" ofType:@""];
NSString *launcherTarget = [NSTemporaryDirectory() stringByAppendingPathComponent:[launcherSource lastPathComponent]];
NSString *appPath = [[NSBundle mainBundle] bundlePath];
NSString *processID = [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]];

[[NSFileManager defaultManager] removeItemAtPath:launcherTarget error:NULL];
[[NSFileManager defaultManager] copyItemAtPath:launcherSource toPath:launcherTarget error:NULL];

[NSTask launchedTaskWithLaunchPath:launcherTarget arguments:[NSArray arrayWithObjects:appPath, processID, nil]];
[NSApp terminate:sender];

If you’re not using Sparkle, here’s a complete implementation of this idea you may find helpful.

1 Comment.

Widget Manager 1.4

Wednesday, March 24th, 2010

Those of you using Widget Manager with Snow Leopard have probably wondered if it would ever be updated for 64bit support, in order to keep System Preferences from relaunching in 32bit mode every time it’s started. If you have, version 1.4 is the release you’ve been waiting for. It adds 64bit support for full compatibility with both Mac OS 10.6 and 10.5 (Tiger users will want to keep the previous version).

I haven’t added new features to Widget Manager for a number of years, but that doesn’t mean it’s not still useful. In my mind it’s as close to complete as possible, and although Widgets aren’t exactly as hot as they were in the 10.4 days Widget Manager is still one of the first things I download whenever I reinstall Mac OS. Widget Manager is free, so give it a try if you haven’t used it yet!

No Comments.

Brent Simmons on Core Data

Saturday, February 27th, 2010

Brent Simmons has an interesting write-up on his experience with Core Data on NetNewsWire for the iPhone:

At that point, having done everything else, the remaining issue was clearly Core Data. So I tried more things, re-read everything I could about Core Data performance (for the nth time), ran experiments, spent tons more time in Shark. Trying to get it good. No go.

Finally I realized I had to switch away from Core Data and use SQLite more directly. Not completely directly — I use FMDB, a lightweight Objective-C interface that works on Macs and iPhones. Gus wrote it. It’s good.

A good introductory read on the differences between Core Data and SQL storage is Matt Gallagher’s article, which Brent also mentioned.

No Comments.

iPad

Friday, January 29th, 2010

As I expected, everyone’s talking about the iPad this week. The part that comes as a surprise is what they’re talking about. The big news isn’t iBooks, or the custom processor, or that it runs iPhone apps. People are talking about the iPad as a revolution in computing; that it’s the first step in what we can expect computers to act like in the future.

Steven Frank:

In the New World, computers are task-centric. We are reading email, browsing the web, playing a game, but not all at once. Applications are sandboxed, then moats dug around the sandboxes, and then barbed wire placed around the moats. As a direct result, New World computers do not need virus scanners, their batteries last longer, and they rarely crash, but their users have lost a degree of freedom. New World computers have unprecedented ease of use, and benefit from decades of research into human-computer interaction. They are immediately understandable, fast, stable, and laser-focused on the 80% of the famous 80/20 rule.

Fraser Speirs:

The tech industry will be in paroxysms of future shock for some time to come. Many will cling to their January-26th notions of what it takes to get “real work” done; cling to the idea that the computer-based part of it is the “real work”.

It’s not. The Real Work is not formatting the margins, installing the printer driver, uploading the document, finishing the PowerPoint slides, running the software update or reinstalling the OS.

The Real Work is teaching the child, healing the patient, selling the house, logging the road defects, fixing the car at the roadside, capturing the table’s order, designing the house and organising the party.

In a world where other companies are focusing on building more netbooks and tablets with Windows that act like a normal PC, if anyone can pull this off I’d put my money on Apple.

No Comments.