Re: Problem setting dependencies to custom framework
Re: Problem setting dependencies to custom framework
- Subject: Re: Problem setting dependencies to custom framework
- From: Ken Tozier <email@hidden>
- Date: Sat, 9 Jul 2005 13:01:26 -0400
On Jul 9, 2005, at 11:30 AM, Chris Espinosa wrote:
It sounds like you've set up the framework to be embedded, but not
set the application to look for the framework in its embedded
place. Go to
http://developer.apple.com/documentation/MacOSX/Conceptual/
BPFrameworks/Tasks/CreatingFrameworks.html
and read the steps after the paragraph that begins "Once your
framework target is configured, you can proceed with the
modifications to your application target. "
This method hasn't changed for 2.0 and 2.1.
OK I tried that and the app compiles without complaint but when I
attempt to create a new object from the framework, it's always null.
Also, the documentation differs from what you actually see in the app
project window in the following ways:
Under the "Table 1 : Framework configuration options" table, the
"Preferred address" states that "The memory address to use for
prebinding operations. You should always set this option for
frameworks. See Frameworks and Prebinding for more information." If
you click the link in this field "http://developer.apple.com/
documentation/MacOSX/Conceptual/BPFrameworks/Concepts/
FrameworkBinding.html#//apple_ref/doc/uid/20002256-106894-BAJDCHID"
under 10.4 it states:
"Improvements to the dynamic loader in Mac OS X v10.3.4 made
prebinding largely unnecessary. The dynamic loader itself was
modified to handle load-time conflicts much more efficiently. Using
the new dynamic loader, an application that is not prebound now
usually launches at least as fast (and sometimes faster) than it did
on earlier versions of the system when it was prebound."
So I assume that it's not necessary to define "-seg1addr 0xb0000000"
on 10.4 systems. Correct?
The second difference appears in step one from your link :
"1. Add your framework product to the Frameworks & Libraries build
phase of your application target. This tells the application where to
find your framework during the link phase. Make sure you drag the
icon for your framework from the Products directory of your project.
Dragging the target icon for the framework has no effect."
My app has no "Frameworks & Libraries build phase" and when I click
on the application target, bring up the contextual menu->Add->New
Build Phase, there is no option for "Frameworks & Libraries". The
available build phases in the app are:
• Copy Bundle Resources
- MainMenu.nib
- InfoPlist.strings
• Compile sources
<app sources listed here>
• Link binary with libraries
- Cocoa.Framework
• Copy files (Which I added to copy my framework)
- CLTool.framework
Is this right?
Here's everything appears in my App's target after all these changes:
• CLRunner
• CLTool (framework icon, with a little green check mark on it)
• Copy Bundle Resources
- MainMenu.nib
- InfoPlist.strings
• Compile sources
<app sources listed here>
• Link binary with libraries
- Cocoa.Framework
• Copy files (Which I added to copy my framework)
- CLTool.framework
Any obvious problems?
Thanks for any help
Ken
P.S. Just a comment on this whole framework creation process. It
seems like it would be much more user friendly if developers could,
during the development process, select a set of files in the project
(that they already have working and have decided they want to package
in a framework), and just choose a "Create framework with selection"
menu option. The resulting dialog would present all the basic fields
needed to make a framework, like
• Framework name (text field)
• Install location (popup menu)
- (app)/Frameworks
- (user)/Library/Frameworks
- (libraries)/Frameworks
Click OK and viola. A fully formed Framework project with all the
required settings, links and dependencies set correctly. The current
method is all well and good if you are already a master at creating
frameworks, or really want to get into the bowels and tweak things,
but is really unnecessary for most needs.
_______________________________________________
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