tags:

views:

125

answers:

1

When debugging in Xcode, how do I simulate a user starting my Cocoa droplet application by dropping one or more files onto it's application icon?

The app just opens, processes the files while displaying it's progress and then closes again.

Passing arguments (via the "Arguments" tab of the entry under "Executables") should allow this, but I could not find out how.

What I really want is to hit "Build and Go" and then have the droplet open with whatever files I need.

A last resort would be to use AppleScript or the "open" command on the command line to achieve this. I want to streamline this as much as possible.

Thanks for any pointers!

A: 

Add each absolute path to a file you want to open with the application as an argument. You may need to wrap each one in quotation marks (which shouldn't be necessary, and is a bug if it is, but I do remember needing to do).

You should be able to use variable references like $SRCROOT in order to refer to files within the project root directory.

Peter Hosey