Help! Ejecting Drive With AppleScript within Xcode Gives Beachball

I’m trying to get a remotely mounted drive to nicely unmount or eject. Building through AppleScript within Xcode, the drive will eject, but only after getting the beachball for 10 seconds or so.

If I run this script from Script Editor, the disk ejects immediately.

tell application “Finder”
eject disk “ibLibrary-HD1”
end tell

Has anyone had this issue? -Thanks

Quad G5
MacOS 10.5.7
Xcode 3.1.2
Script Editor 2.2.1


try to use the shell command diskutil unmount but the fastest methods are the
low level functions FSEjectVolumeSync() and FSUnmountVolumeSync() from CoreService’s File Manager

Thanks for the post Sankt,

The diskutil unmount unfortunately did not work. It’s odd that I can unmount the drive through the Finder, TerminaI, & Script Editor, but not AppleScript in Xcode. I don’t know enough about Xcode to use that FSEjectVolumeSync() code. I really appreciate your help. Thanks