Ok -- the files I'm adding are already in the project. Basically, I'm trying to automate the creation of a framework by locating *all* .h files and copying them into the Headers directory within the framework, but taking into account the subdirectory-ness of them so that current code still works.
It seems that the Copy Files Phase instance only maintains a collection of build files, not file references. If you look at build file, you'll see that it has a file reference. So I'm assuming that I need to create a "build file" instance and set it's file reference.
I tried your initial suggestion of:
add file reference "main.m" to build phase 1 of target 1
Modified for the context of my script:
add file reference aFile to aCopy of aTarget
But I get this:
'Xcode got an error: Can't make file reference (item 2 of every file reference of project "Test") into type reference.'
Thanks for you help!!!
On Sep 21, 2005, at 7:16 PM, Gouri jonnalagadda wrote: You cannot really make a new build file (Just adding a new file to a build phase is not supported in UI also. You can only drag the files that are present in the project or other projects into a build phase). Build files are files that are added to a build phase to achieve certain things. These files are ideally present in the project itself and they should belong to a target.
So, in order to add a file as a build file to a build phase of a target you need to first add the file to the project, then add it to the build phase.
The internal error part is a known issue. It is a cocoa scripting issue and not coming from Xcode.
Gouri |