On 19 Jul 2005, at 18:22, Chris Espinosa wrote:
I have an XCode 2.0 project which builds an application that uses a "Copy Files" build phase to copy private frameworks into the application's package frameworks folder. These frameworks are built with other XCode 2.0 projects, externally to the application.
Naturally, I want to be able to copy the Development framework into the application package when I'm debugging and the Deployment framework when I'm compiling for release.
With XCode 2.0 this was trivial as all I had to do was build the frameworks with the appropriate build style I needed and XCode would pick up the right framework as there was only one directory they could be in i.e. the "build" folder. This isn't the case now as they end up in sub-folders of the build folder called, "Deployment" and "Development".
So, without resorting to shell script, how do I get my application project to copy the appropriate framework into its package?
Changing default build directories for XCode, in the app preferences, isn't going to fly either. This should "just work" from a clean virgin installation and a sync from the source control system as it does with XCode 2.0.
This should "just work." If you could describe how your project is set up to "pick up" the framework, and what the failure mode is, that would be very helpful. What we've seen so far is that projects are referring to built products relative to $(SYMROOT), when they should be relative to $(BUILT_PRODUCTS_DIR).
In a "Copy Files" build phase, I point it at the framework or shared library and set the pop-up menu to copy the item to the right folder in the app wrapper. So... with XCode 2.0 it would have pointed to /SomePath/SomeProject/build/SomeProject.framework and happily copied it whether it was built for Deployment or Development.
Of course, that doesn't work anymore with XCode 2.1 as the path would now have to be, /SomePath/SomeProject/build/$BUILD_STYLE/SomeProject.framework which you can't select for obvious reasons. I can only select the Development *or* the Deployment build which means I don't necessarily get the right framework for the build style of the project using it.
If you like, I can mail you such a situation with two example projects.
Of course this all applies for linking the project via the IDE too. I have currently got the project using "-framework SomeProject" and "-lSomeLibrary" with the paths set, manually, for Deployment and Development.
Chris