Re: Custom embedded framework not working [Solved]
Re: Custom embedded framework not working [Solved]
- Subject: Re: Custom embedded framework not working [Solved]
- From: Ken Tozier <email@hidden>
- Date: Sat, 28 Jul 2007 15:32:52 -0400
After an hour's more futzing, I finally got it working. For others in
the same boat, here are the magic incantations
In the framework project
1. Select you framework under "Groups and Files>Targets"
2. Do a "get info" in the target
3. Select the "Build" tab
4. Select "Deployment" option in the "Collection" popup
5. Change the "Installation directory" field to "@executable_path/../
frameworks"
6. Build the framework
In the application that embeds the framework
1. Select "Frameworks > Linked Frameworks" under "Groups & Files"
2. Control-click to bring up the contextual menu and select "Add >
Existing Frameworks"
3. Navigate to your framework's build folder and select <framework
name>.framework.
4. Create a "Copy files" build phase and drag the framework icon into it
Done.
While this solves the embedding problem, it still requires framework
projects to specify their deploy location. There must be a way to
embed a framework without this customization so if anyone knows of a
way, it would be a big help
Ken
On Jul 28, 2007, at 2:09 PM, Ken Tozier wrote:
Hi
I'm taking my first foray into creating custom frameworks and while
they work fine if I manually place them in "/Library/frameworks/"
I'm having no luck embedding them in an application.
I read the relevant documentation here http://developer.apple.com/
documentation/MacOSX/Conceptual/BPFrameworks/Tasks/
CreatingFrameworks.html#//apple_ref/doc/uid/20002258-106880,
Googled, read any links that looked promising, watched this video
at http://rentzsch.com/share/embeddingFrameworks.mov (although that
seems to be out of date as it specified using -seg1addr in the
other linker flags ) but I'm clearly doing something wrong.
First question I have regards the documentation stating that you
have to set the build targets of both the app and the framework to
the same directory. Is that correct? If so, doesn't that mean that
anyone who wants to use a custom framework has to have the complete
source and customize the build settings of all custom framework
projects for each application they want to use it in? That just
seems suspect as no one other than the original framework developer
could ever embed a non-apple framework.
Second question: When I followed the Apple instructions at the
above link, I got a link error that no amount of "build path"
twiddling was able to fix.
I ended up using a combination of the rentzsch.com method for
adding the framework to the (control>add>existing frameworks) along
with the adding a "copy files" build phase. All the public headers
are flagged correctly.
When I run the app I get the error "/Library/Frameworks/
KViews.framework/Versions/A/KViews." I can't understand why this is
happening as the compiled app contains the KViews.framework in it's
embedded frameworks folder.
Any insights greatly appreciated
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net
This email sent to email@hidden
_______________________________________________
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