• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Any way to script out paths of source files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any way to script out paths of source files?


  • Subject: Any way to script out paths of source files?
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 10 Nov 2012 16:10:50 -0800

It looks like AppleScriptability is still broken, even in Xcode 4.5.2, to the point that I can't even get a list of source file paths in a project.  This script…

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?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [SOLVED, SADLY] Any way to script out paths of source files?
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: search in jump bar menu
  • Next by Date: Any way to get Xcode to not open folders when dragging them?
  • Previous by thread: Re: search in jump bar menu
  • Next by thread: Re: [SOLVED, SADLY] Any way to script out paths of source files?
  • Index(es):
    • Date
    • Thread