Last.fm doesn’t autostart with iTunes in Lion [Fix]

Update 04/08/2011: last.fm have updated their client, either use the Check for updates.. in the app or download it.

Still no scrobbling but the release notes show they’ve fixed it for Lion:

1.5.4.28012 (mac) (04/08/11)
—————————-
* Plugin fix for iTunes 10.5
* 64bit version of the plugin for iTunes on Lion

Original:
Sadly the last.fm client doesn’t autostart under Lion when you run iTunes; and there’s yet to be an official update. In fact the entire client has been rather neglected, seeing its last update in October 2010.

If like me, you’ve lost a bunch of scrobbles because you’ve forgotten to open it, you can add last.fm to your login items so it’ll automatically open when your Mac starts.

Open System Preferences then > Users & Groups; select your username and toggle to the Login Items page. Click the + and select the last.fm app to add to the list.

Mac System Preferences - adding last.fm to login items

If like myself, you have the last.fm not show in the dock (and only the menu bar), select the Hidden checkbox.

Unfortunately there’s no iPhone / iPad scrobbling support on Lion yet, and I’m not sure how iOS 5 WiFi sync will be able to handle it..

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!

Avoid Entering Username and Passwords After Restoring iOS

If you restore your iOS (iPhone or iPad) from a backup in iTunes, you’ll find you need to re-enter your usernames and passwords for all your email accounts.

Simply tick the Encrypt iPhone Backups option in the device summary tab in iTunes and enter a password to secure your backups. iTunes will now backup and restore your sensitive data, usernames, passwords and MobileMe data, and do so securely.