1

I have a script which converts wav files to caf files, and I'd like to get them copied to my iOS app automatically. The script looks like this:

XCode 6 Run Script for Wave Conversion

Xcode doesn't copy it automatically, and i can't find a way to add it to my Copy Build Phase section. It appears that I need to add a line in the script to copy it directly to the app bundle, or to make the destination the app bundle itself.

What would that script/change be? I'm not sure what shell vars to use for the cp command.

Thanks - Henry

henryaz
  • 870
  • 1
  • 8
  • 18
  • Hmmm - my question was mistaken. It appears that I'm not getting the script to run at all. My wav files are being copied instead of being processed by the script, according to my reading of the build logs. Before I modify the question, what step am I missing in getting the script itself to run? – henryaz Oct 16 '14 at 09:07

1 Answers1

1

The environment variable you're looking for is "BUILT_PRODUCTS_DIR" and you can find the definition of this, and plenty of other useful Xcode-specific environment variables on this handy Apple documentation page.

And what you'd probably want to do is test for the existence of successfully converted files, and if they exist, then copy those files into the "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" directory.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215