21

When Compiling for iPhone Simulator with Xcode 4.2, if I place

"$(BUILT_PRODUCTS_DIR)"

in

Build Settings / Header search paths / Debug

and exit editing I can see it resolves to:

"build/Debug-iphoneos"

Where should this be on my system? I have looked in:

Library/Developer/Xcode/DerivedData/{Project Name}/Build

but I can't find a file called build that contains a folder called Debug-iphoneos.

Donal Lafferty
  • 5,807
  • 7
  • 43
  • 60
Undistraction
  • 42,754
  • 56
  • 195
  • 331
  • 2
    See [here](https://stackoverflow.com/questions/6910901/how-do-i-print-a-list-of-build-settings-in-xcode-project/36213785#36213785) you can get them as simply as adding `export` into a shell script used in the build phase. you might even already have a script used in your build phases, so you can just dump `export` at the end of the that scrip and then just search for `BUILT_PRODUCTS_DIR` from Xcode's **Report Navigator** – mfaani Jan 18 '21 at 16:39

1 Answers1

11

On my system, compiling an OSX project, that resolves to an absolute path:

BUILT_PRODUCTS_DIR /Users/andy/Source/MyProject/build/Debug

There are so many Xcode build variables that I keep a text file with a sample list of them which I got from executing a custom build script and viewing the output within the log tab.

If your code is going into the Library folder, then that is hidden under Lion. You can unhide it from the command line (Terminal) using:

$ cd ~
$ chflags nohidden Library

You should then be able to see its content.

Another tip: I have a ~/tmp folder where I let temporary stuff accumulate and I have set my Xcode preferences to put DerivedData and Archives into that folder so I can:

  • delete it now and again (I don't like temporary stuff accumulating where I cannot control it).
  • see it for packaging pre-release Archived project to testers.
trojanfoe
  • 120,358
  • 21
  • 212
  • 242