Wrong Frameworks Build Configuration Copied to App Pkg
Wrong Frameworks Build Configuration Copied to App Pkg
- Subject: Wrong Frameworks Build Configuration Copied to App Pkg
- From: Jerry Krinock <email@hidden>
- Date: Thu, 20 Mar 2008 17:18:38 -0700
I have an app and some private frameworks, all in separate projects.
Each has three Build Configurations: Release, ReleaseUnstripped, and
Debug. I use a common Build Products folder set in Xcode preferences.
In order to add a private framework to an app, following the
documentation [1], I drag from the framework's "Groups & Files" ►
Products ► AFramework.framework into the "Groups & Files" "Files" tab
of the app. (I'm using Condensed View.) The documentation [1] also
says that I should also drag this same product to the app's "Copy to
Frameworks" Build Phase, but Xcode does not accept that drag. So,
instead, I drag the image of it that I have previously dropped; i.e.
from the "Files" tab to the "Targets" tab. That drag is accepted.
Now, according to [2], "If your framework and your main app are using
the same shared build folder, the Frameworks Search Path implicitly
searches the shared build folder, and that works on a per-
configuration basis."
I've often wondered if this really works and today I found that it
ain't. I cleaned both Release and ReleaseUnstripped products with
"Also Clean Dependencies". Then, I built ReleaseUnstripped. The
Build Transcript, and examination of the products, shows that it
correctly produced each framework in Builds/ReleaseUnstripped (they're
dependencies), but when it got to Copy Files it tried to copy the
frameworks from Builds/Release and found No Such File.
How could I have screwed this up?
Jerry
One thing that has always bothered me about this magic is that when I
hold my mouse over such a private framework in my app's Groups & Files
► Files, the tooltip always shows me the path to the Release build.
Since the path supposedly depends on the current Build Configuration,
either it should change when I change the Build Configuration or
indicate a placeholder such as $(CONFIGURATION) in the path.
I cleaned all the old junk out of my FRAMEWORK_SEARCH_PATHS, so that
now there are only three paths in there: My customized Builds/Release,
Builds/ReleaseUnstripped and Builds/Debug. But pbxcp is explicitly
looking for the wrong one. Here is an example from the Build
Transcript (with whitespace added to make readable),
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/
Resources/pbxcp
-exclude .DS_Store
-exclude CVS
-exclude .svn
-resolve-src-symlinks
/Users/jk/Documents/Programming/Projects/MyApp/../../Builds/
Release/BmStuff.framework
/Users/jk/Documents/Programming/Builds/ReleaseUnstripped/
MyApp.app/Contents/Frameworks
pbxcp: BmStuff.framework: No such file or directory
[1] Apple's Framework Programming Guide ► Creating a Framework ►
Embedding a Private Framework in Your Application Bundle.
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html#/
/apple_ref/doc/uid/20002258-106880
[2] http://www.cocoabuilder.com/archive/message/xcode/2006/1/25/3324 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden