Projects with cross-project references would often pull the build product for a Copy Files or Link build phase from the wrong configuration of a dependent target. This has been fixed. 6024409 The Active Architecture build setting now works correctly with cross-project references, so that collections of related targets are all built with the same architecture. 5908284
I just thought I'd call out these bug fixes specifically, because they mean Xcode's support for cross-project references is significantly improved with Xcode 3.1.1.
You no longer need to set up your projects to share a build directory. Each project can build into its own build directory, and the product of one project can be referred to in another directly.
Let's say you have a framework and an application that you build as separate projects in directories next to each other:
MyApplication/ build/ MyApplication.xcodeproj
MyFramework/ build/ MyFramework.xcodeproj
You can do the following, and they will Just Work:
- Drag MyFramework.xcodeproj into MyApplication.xcodeproj. - Link your application target against the resulting MyFramework.framework product node. - Drag the MyFramework.framework product node into a Copy Files build phase to embed it in your applicaiton.
The one caveat to this is that you do still need to set up your application target's Framework Search Paths to be able to find headers in the framework.
You can do this easily by ensuring the Copy Files build phase that embeds your framework comes before the Compile Sources build phase under your application target, and adding
FRAMEWORK_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)
to your application target's build settings. (You can just copy the line above and paste it into the build settings table in the target inspector.) Doing this will cause the compiler to search the built application's embedded Frameworks folder when looking for frameworks and their headers.
Alternately, you can use a Copy Files build phase in your application target to copy frameworks used during its build to a central location and then add the path to that location to your Framework Search Paths.
-- Chris
|