views:

154

answers:

1

Hi everyone,

I'm building an iPhone application, and I want to run a custom built-on-the-fly Mac OS X command-line utility during the build phase of the iPhone target. I set up the command-line utility as a dependent target of the iPhone target, but it won’t build, telling me:

target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphoneos’ platform

Is there any way to do this correctly?
Thanks!

+1  A: 

Have you tried adding a run script build phase? From there, you should be able to execute any other scripts you wish, including compiling other tools or projects.

Right click on the target and Add New Build Phase.

drawnonward
Thanks, I managed to find a workaround using the run script build phase. But I'm still wondering if there's a better way to do this. Is this a bug or is it intended that a target on a different platform can't cooperate with another even if it belongs to a different project?
Kay