Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's the best solution to the old framework in a framework problem?



I know there have been many discussions of this subject on the list, with varying responses. I'm wondering how people are actually solving this issue.

The basic problem is that including a framework or other dynamically loaded library in a framework doesn't work because the application including the parent framework can't load the subframework because it's not in the library paths. Building the subframework with the @executable_path/../Frameworks doesn't work because relative to the app, it's not in that path. From what I can glean, the options are:
1) Build an umbrella framework that is stationary (in one of the default library paths) and stick the subframeworks under there. Drawbacks are that this defeats the drag-and-drop installation experience and that Apple recommends nobody but them do this.
2) Roll your own loader. Some people have talked about this, but it seems difficult at best (examples would be appreciated) and I wonder about performance issues here.
3) Build the subframeworks as static libraries and include those in the parent framework. This has the disadvantage of losing the lazy loading of needed resources. Plus, one might not have the source code ;-(
4) Incorporate all the code into a single framework. Same issues as above, I guess.

None of these options seems too great.

I wonder, is it considered a bug in dyld that this situation isn't workable, or is it by design? In any case, I'd really appreciate your wisdom on this subject. Thanks a lot,

John.



-----------------------------------------------------------------------
"It is the truth that frees, not your attempts to be free."
- J. Krishnamurti
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.