This new way that XCode 4.0 handles dependencies frustrates me.

What I want to do is to have a project that has as a dependency a framework. And I want the resulting .framework file to be copied into the actual executable. In Xcode 3 this was a simple procedure, but now, I can't do it with XCode 4.

I create a new workspace. I add the Application Project. I then drag and drop the Framework's project file underneath the Application Project inside the workflow navigator. I select the Application Project's target, and I add as a dependency the framework. I also Link it with this library.

Now, if I build the Application project it will run just fine, but the .framework file is not included in the application bundle which means that when it is being transferred into another location it will not open!

I remember in XCode 3 that there was a copy files build phase that allowed copying the frameworks with the executable. In XCode 4, I can't select the framework file to add it into the copy files build phase!

Please help me, this is an important problem for me.

That will indeed copy the framework BUT it won't link only the copied framework.

When I do this, the actual executable is build inside the same folder "Debug" with my framework in the same folder. The framework exists also inside the application bundle! If I delete any of the two, either the one that is inside the application bundle, or the one that is in the same folder as the application bundle, the application crashes complaining it can't find the framework.

I suspect it has something to do with my build configuration but I haven't located the problem, yet.

Please can you point me in the right direction?

EDIT: Strangest thing: If I run the app using the Finder and not XCode, the application crashes again saying that it can't find the library file. Running it using XCode seems to work fine. What does this mean?

Last edited: