GPS location scripting broken with iPhoto 9.0.1

The latest update to iPhoto '11 is supposed to fix some upgrading and library conversion errors, but the latest version also seems to break some AppleScript functions that some third-party programs may rely on.

Starting with iPhoto 8.0.3, Apple implemented support for editing the geographical positioning tags for photos using AppleScript. The idea in part was to encourage developers of third-party programs like HoudahGeo to edit the photo information in the iPhoto library without directly accessing the library itself.

This implementation has worked for a number of iPhoto revisions, but in the latest update from Apple it appears that setting GPS coordinates with AppleScripts is not working properly. If you run an AppleScript similar to the following that uses the "set latitude" or "set longitude" commands, then you may get an error claiming the "class is not key value coding-compliant for the key gpsLatitude."

tellapplication "iPhoto"
        setmyPhotosto (everyphotowhoseimage pathis "/Users/pierre/Pictures/iPhoto
                      Library/Masters/2010/Oct 11, 2010/IMG_0119.JPG")
        repeat withcurrentPhotoinmyPhotos
                setlatitude of currentPhototo 50.11
                setlongitudeofcurrentPhototo 6.68
        end repeat
end tell

The commands did work in iPhoto '11 version 9.0.0, so this is likely a small oversight by Apple where the function for setting the photo's latitude is not being handled properly by the latest update. Apple quickly rushed out the 9.0.1 update to address importing and upgrading issues some people were having, many of which revolved around extra features such as calendars and potentially some GPS-related content in their libraries.

The API for implementing the AppleScript commands in third-party programs is still available as it always has been, but in implementing the changes to correct the importing problems with the initial iPhoto '11 release, Apple may not have fully tested this API.

We hope Apple will issue an update for this issue soon, because a few third-party programs like HoudahGeo rely on the AppleScript interface for iPhoto to implement their functions.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Featured Video
6
This content is rated TV-MA, and is for viewers 18 years or older. Are you of age?
Sorry, you are not old enough to view this content.

A second phone from OnePlus is coming this year

Co-Founder Carl Pei start talking about their next phone before the OnePlus 2 is even available. Samsung's Note 5 and S6 Edge Plus renders are leaked, and Google gives out Waffles.

by Brian Tong