Xcode Install Requires iTunes to be Closed

When installing or updating Xcode you need to close iTunes for it to complete. If you’ve closed iTunes but still get this message:

In order to continue the install please quit iTunes

Open Activity Monitor and quit iTunes Helper. The installation will now finish.

This mainly seems to happen on beta versions of iTunes. The helper app runs to detect iOS devices being connected so it can auto-open iTunes.

iOS: shouldAutorotateToInterfaceOrientation / Lock Orientation in PhoneGap

Starting in PhoneGap 0.9.5 there’s an undocumented iOS only feature that allows you to handle whether the device should rotate to a particular orientation. It exposes the iOS Objective-C method shouldAutorotateToInterfaceOrientation with a JavaScript function shouldRotateToOrientation.

function shouldRotateToOrientation (rotation) {
    switch (rotation) {
        //Portrait or PortraitUpsideDown
        case 0:
        case 180:
            return true;
        //LandscapeRight or LandscapeLeft
        case 90:
        case -90:
             return false;
    }
}

This needs to be in the global scope of your JavaScript and will get called before any rotations occur, so keep it lean to avoid locking up the UI. Returning true allows the device to rotate, returning false prevents it.

Works great in your HTML5 iOS, iPhone and iPad apps, sadly currently there’s no Android or other platform integration. Hopefully we’ll see a cross-platform method soon!

Things That Give Me Usability Cramps – Web Forms

Usability Cramps

[yoo-zuh-bill-ity kramps]

  1. n. are unpleasant, often painful sensations caused by unbearable unusable user experience mistakes
  2. v. usability cramping, usability cramped, why the hell did they do this?

Form Labels That Don’t Select the Fields

This one mega-stresses me out; when the text label next to checkbox or a label doesn’t select it when you click it:

Bad Form Field:

To fix this, just give the input field an ID, and the label a for=’inputID’:


This is particularly annoying when there’s lots of checkboxes or really small radio buttons.

tip: add the following CSS to force the browser to show a pointer on clickable labels and buttons:

label, input[type="button"], input[type="submit"] {  cursor: pointer; }

Mobile Sites That Don’t Use the Right HTML(5) Input Types

If you use the correct types for your inputs then touchscreen devices adapt the keyboard to fit the need, and browsers can adjust the UI accordingly.




iOS Screenshot of email keyboard

Using input type='email' brings up an email specific keyboard on iOS

Browsers that don’t understand these new input types default to text, so you’ve got nothing to lose.

Forms That Need to Reload to Validate

It’s so easy to check your forms with a bit of JavaScript, instead of having to refresh the whole page; and generally require any password or captcha fields to be re-enter.

Oh, and if you have a username field, check it’s available before I click submit:

Twitter showing a username's available

Twitter Signup

I’m purposely not linking to any validation scripts; there’s not a universal drop in one I’d want to recommend, however, keep an eye on the native browser support for validation.

Android 2.3 Gingerbread Released

Nexus S - Google Phone

Nexus S - Google Phone

Android 2.3 Gingerbread Home Screen

Android 2.3 Gingerbread Home Screen

So Android 2.3 is being rolled out the next few days, and will be available on the Nexus One and the new Nexus S initially. It’s got some much needed UI tidying up (till HTC get to it), but here’s what else is cool in it:

Android 2.3 iPhone like Copy & Paste

Android 2.3 iPhone like Copy & Paste

iPhone-esque Select, Copy and Paste

You can now select a group of text easily without using the trackball.

Tapping on a single word also selects it.

Front Facing Camera support on Android 2.3

Front Facing Camera support on Android 2.3

Front Facing Camera

Sure lots of third party apps will support this, but I wonder if we’ll see a Google FaceTime competitor? They’ve got the infrastructure in place, so I’m sure it’s coming..

Near Field Communications on Android 2.3

Near Field Communications on Android 2.3

NFC– Near Field Communications

Think of this as QR codes without the aggravation of having to fire up the camera and waiting for focus. Expect these to be popping up everywhere over the next 12-18 months.

Other notables

  • ‘Overscroll’ – kinda like bounce scroll on iPhone, an effect to hint when you get to the beginning or end of a scrollable area
  • Support for ‘Extra Large’ Screens – hints at tablet support finally coming
  • Download Manager – universal across all apps, something iOS currently lacks
  • SIP Support – make phone calls over the web
  • Extended sensor support- gyroscope, rotation vector, linear acceleration, gravity, and barometer hardware now supported
  • VP8 and WebM- video codecs Google are pushing for HTML5 video

Here’s the official summary video: