tell application "Xcode"
repeat with aProject in projects of workspace document 1
repeat with aTarget in targets of aProject
repeat with aBuildFile in (build files of aTarget)
set fileRef to file reference of aBuildFile
set aName to name of aBuildFile
if (fileRef is missing value) then
set aPath to "Shucks!"
else
set aPath to full path of fileRef
end if
log ("Path is " & aPath & " for " & aName)
end repeat
end repeat
end repeat
end tell
just prints out "Shucks!" for each source file. I think this is because the Xcode team has not connected the file reference property of build file instances.
Does anyone know another way? Must I reverse-engineer the .xcodeproj document package?