HTML5 Boilerplate Build Script: no manifest.appcache generated!

The HTML5 Boilerplate build script can auto generate your manifest.appcache file but it doesn’t out of the box.

Slightly hidden away in the docs:

To enable the appcache, just uncomment the file.manifest line in the project.properties file. It’ll create a manifest.appcache file and wire it all up.

You’ll find the project.properties file in build/project.

Now just do ant build and your HTML5 manifest file will be created and automatically referenced in your HTML file.

Xcode 4.2 Doesn’t Show Exception Stack Trace in Console

When using Xcode 4.2 for iOS development there’s an annoying bug where any exceptions crash to the main.m file instead of highlighting the line. Luckily you can set a custom breakpoint to restore the old and correct behaviour:

  1. Open the Breakpoint navigator (CMD + 6)
  2. Click the + button in the bottom left
  3. Select Add Exception Breakpoint 
  4. Click Done

Xcode 4.2 Window

Voila!

Status Barred: iOS Screenshot Status Bar Remover App

So many iOS apps developers forget to remove the screenshots from their apps on the App Store; often revealing the horrendous times the screenshots were taken and detracting from the actual app.

iTunes Connect recommends the removal of the status bar, and Status Barred removes the status bar perfectly regardless of the screenshot being retina, iPhone, iPad, landscape or portrait. For $0.99 it saves a bunch of time whenever submitting or updating an app.

Available on the Mac App Store

Using Boolean Values with TouchJSON

When creating an NSDictionary to serialize as JSON with TouchJSON you can’t set a BOOL value in the dictionary because it requires an object.

Use an NSNumber, which will be converted to true or false by the TouchJSON library.

Eg:

NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init];
[dictionary setObject:[NSNumber numberWithBool:YES forKey:@"shouldBeOn"];
[dictionary setObject:[NSNumber numberWithBool:NO forKey:@"shouldBeOff"];
NSError *error = NULL;
NSData *jsonData = [[CJSONSerializer serializer] serializeObject:dictionary error:&error];

Produces:

{
    "shouldBeOn": true,
    "shouldBeOff": false
}

The software for this printer is currently unavailable [Lion]

Lion no longer installs all the printer drivers out of the box, I guess to cut down on unnecessary downloading from the Mac App Store. On 10.7.1 it wouldn’t let me add a printer with the error:

The software for this printer is currently unavailable. Please contact the printer’s manufacturer for the latest software.

However by running Software Update (from the Apple menu bar) after connecting the printer, it successfully downloaded the correct drivers. The Add Printer option then automatically installs the printer once selected.

Update, thanks to Rob in the comments for his suggestion that seems to be helping a lot of people:

If run­ning Apple’s Software Update doesn’t fix it for you, open Preferences->Print & Scan and then hit ctrl-click (or right mouse) over the list of print­ers and select “Reset Printing System…”. That will unin­stall all your print­ers but then I was able to add the Officejet by click­ing the “+” but­ton and the error went away.