Cannot Connect to Facebook Chat in Adium with Lion

Due to some cookie restriction in Lion the latest stable or beta version of Adium cannot connect to Facebook chat.

Luckily they just re-enabled their nightly builds which fix the issue.

Download the latest nightly from: http://nightly.adium.im/

Make sure you get the 1.4.3 nightly currently: http://nightly.adium.im/?repo_branch=adium-1.4-default

As the 1.5 builds are unstable.

Update: Adium have now released a beta fixing this issue: http://beta.adium.im/. Betas are usually more stable than nightlies so use this!

Missing Fonts in Mac OS X Lion (10.7)

After upgrading to Lion I found it disabled a few of the system fonts. This made lots of websites not display as intended and warnings about Missing Fonts in Pages (which had the benefit of artificially inflating my book’s page count bringing it nearer completion).

Turns out Lion can disable certain fonts in certain circumstances; I did a clean install of Lion on a different drive when running the Install Mac OS X Lion app.

You can re-enable the fonts like this:

  1. Open Font Book, it’s stored in your Applications folder. You’ve got Lion now so you could be fancy and use Launchpad.
  2. Find a font that has been disabled – in my case Verdana was the key one. Right click the font and select Enable ‘font name’ Family:
    Enabling the Verdana font in the Font Book on Mac Lion
  3. Repeat this for any other fonts that have been disabled.

 

You can automatically activate fonts added in the future by ticking Automatic font activation from the Font Book Preferences menu:

 Font Book preference window

Mac OS X Lion’s “Safe files” No Longer Opens Disk Images

Looks like in Safari 5.1 in Lion disk images (.dmg) are no longer classed as “Safe” files after the whole Mac Defender cat and mouse malware saga.

The enabled by default “Open ‘safe’ files after downloading” preference of Safari automatically opens certain types of files as a convenience aid.

Safari 5.0 on Snow Leopard:

Safari 5.1 on Lion:

I found this quite useful, but I guess it’s just another move closer to an ‘App Store’ only world..

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!