• 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: Scripting adding files to a project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting adding files to a project


  • Subject: Re: Scripting adding files to a project
  • From: Rick Ballard <email@hidden>
  • Date: Tue, 25 Oct 2005 15:46:45 -0700

On Oct 25, 2005, at 9:57 AM, Nathan Herring wrote:

Does anyone have a working script that allows you to create new file
references and assign them to various targets? My attempts have met with
silent failure: no error reported, and no files added.

Sure; try something like this:

tell application "Xcode"
tell project "MyProject"
set newFileRef to make new file reference with properties {name:"foo.m", full path:"/tmp/foo.m"} at end of (file references) of group "A Source Group"
add newFileRef to target "MyTarget"
end tell
end tell


I'd be interested to see what you were trying that didn't work; if it wasn't correct, it probably should have given you an error.

I hope this helps.

	- Rick
_______________________________________________
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: 
 >Scripting adding files to a project (From: "Nathan Herring" <email@hidden>)

  • Prev by Date: Re: static libraries
  • Next by Date: Holger Hoerich is out of the office.
  • Previous by thread: Scripting adding files to a project
  • Next by thread: Re: Scripting adding files to a project
  • Index(es):
    • Date
    • Thread