• 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
Re: Finding the Xcode 4 "Build Products Path"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the Xcode 4 "Build Products Path"


  • Subject: Re: Finding the Xcode 4 "Build Products Path"
  • From: Shane Stanley <email@hidden>
  • Date: Sun, 14 Oct 2012 17:41:12 +1100

On 14/10/2012, at 12:43 PM, Jerry Krinock <email@hidden> wrote:

> it is pretty fragile

No question. Strictly of the "something is sometimes better than nothing" variety.


On 14/10/2012, at 1:57 AM, "Mills, Steve" <email@hidden> wrote:

> Your solution won't for those of us with multiple source control branches.

It could be made to, BTW. You'd get the list of matching folders, then query the enclosed Info.plist files for the key WorkspacePath, looking for a match with your .xcodeproj file. This script uses my FBA for speed and convenience, but you could also do it in vanilla AppleScript:

set DDPathHFS to (path to library folder from user domain as text) & "Developer:Xcode:DerivedData:"
tell application id "com.apple.dt.Xcode"
	set theName to name of project 1
	set projPath to path of project 1
end tell
tell application "ASObjC Runner"
	set newName to replace string " " in item theName replacing with "_"
	set thePaths to (enumerate folder DDPathHFS match prefix (newName & "-") with posix)
	if (count of thePaths) = 1 then -- only 1 found
		return item 1 of thePaths
	else
		repeat with i from 1 to count of thePaths
			set theDict to read plist at ((item i of thePaths) & "/Info.plist")
			set thePath to WorkspacePath of theDict
			if thePath = projPath then
				return item i of thePaths
				exit repeat
			end if
		end repeat
	end if
end tell



--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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

References: 
 >Finding the Xcode 4 "Build Products Path" (From: Jerry Krinock <email@hidden>)
 >Re: Finding the Xcode 4 "Build Products Path" (From: Shane Stanley <email@hidden>)
 >Re: Finding the Xcode 4 "Build Products Path" (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Finding the Xcode 4 "Build Products Path"
  • Next by Date: ARC settings for IB
  • Previous by thread: Re: Post-action Script Syntax. Was: Finding the Xcode 4 "Build Products Path"
  • Next by thread: xcodebuild archive fails if given -target; OK if -scheme
  • Index(es):
    • Date
    • Thread