It seems the “mount volume” command typically used in AppleScript throws an error when used in ASOC. It would be ideal for what I am doing but I can’t get it to work.
[center]malloc: reference count underflow for 0x200036500, break on auto_refcount_underflow_error to debug.[/center]
Instead I found FSMountServerVolumeSync but it’s a bit tricky too and seems to yield no error or results. I’d like it to prompt the user for credentials with the option to store the info in the keychain. Any help would be appreciated.
on mountVolume(thePath)
set theURL to current application's NSURL's URLWithString_(thePath)
set theRefNum to current application's FSVolumeRefNum()
current application's FSMountServerVolumeSync_url_mountDir_user_password_refNumber_flags_(current application's CFURLRef_(theUrl), null, null, null, theRefNum, 0)
end mountVolume