3

I have a scheme in Xcode 4. I edited the scheme so that Build has a Pre-Action, and that action is a script.

The script is simple - it dumps pre-processor defines: cpp -dM < /dev/null.

Where do I find the output of the script?

Flexo
  • 87,323
  • 22
  • 191
  • 272
jww
  • 97,681
  • 90
  • 411
  • 885

1 Answers1

10

add this line to pre-action script

pwd > ~/current_directory.txt

then check file current_directory.txt in your home directory

hsarret
  • 446
  • 1
  • 3
  • 10
  • 1
    That just takes me to a directory that is chock-full of who-knows-what: `/private/var/folders/_p/mp_84lr50bxc8957ch30wknh0000gn/T`. Still can't find the output. :( – Albert Bori Dec 06 '14 at 00:00
  • Just tested again, that **chock-full of who-knows-what** directory contains my newly created file. Care to elaborate on what you are trying to achieve and your steps ? – hsarret Dec 06 '14 at 07:54
  • Is there a specific naming convention that the output file matches? I wasn't able to identify the file among the 661 files and folders in that directory. This folder appears to be the dumping grounds for all the programs on the computer. Using sublime, I did a file-content search in that directory, and it didn't return any of my echo statements. I'm attempting to get the output for this [script](https://pontifex.azurewebsites.net/xcode-auto-increment-build-on-archive/). – Albert Bori Dec 06 '14 at 16:38
  • 1
    Just did an `echo ${PROJECT_DIR}/${INFOPLIST_FILE} > ~/Debug.txt` and `~/Debug.txt` contains path to .plist file. – hsarret Dec 08 '14 at 09:04