Embedding a framework within an app

Mark de Jong marquedej at mac.com
Wed Apr 2 08:19:24 PDT 2008


Johannes,

Thank you for this suggestion. My embedded framework now works.

The trick seems to have been disabling "prebinding" in the framework. Once I did that, the correct "framework location" shows up in the app's binary.

Thanks, again!

  -- Mark
 
On Wednesday, April 02, 2008, at 07:09AM, "Johannes Huning" <john at quobor.com> wrote:
>Maybe Mr. Rentzsch can help you: http://rentzsch.com/cocoa/embeddedFrameworks
>
>On Apr 2, 2008, at 3:59 PM, Mark de Jong wrote:
>> Hi!
>>
>> I seem to be missing some basic "point" about embedding a framework  
>> within an application.
>>
>> I have built a framework in one project and an application in  
>> another project. Up until now, I have simply been installing the  
>> framework at "/Library/Frameworks" and then my application has used  
>> the framework and all is well.
>>
>> Now, I'd like to embed the framework within my application.
>>
>> I have read all of Apple's docs on how to do this. Changed the  
>> framework's "Install Directory" (INSTALL_PATH) to be  
>> "@executable_path/../Frameworks" and have been sure to place a copy  
>> of the framework within the application's bundle at "MyApp.app/ 
>> Contents/Frameworks" using a "Copy" build phase, as instructed in  
>> the docs.
>>
>> I have added the framework project to the application's project and  
>> pointed the build directory of the framework to the application's  
>> build directory. I made the framework "Product" a dependency of the  
>> app's project.
>>
>> The application still cannot find the framework.
>>
>> Using "otool -L" on both the application binary and the framework  
>> binary, they both show "/Library/Frameworks" as my framework's  
>> location.
>>
>> I know I'm just being boneheaded and am missing something basic or  
>> obvious.
>>
>> Would some kind soul please point out the error of my ways to me? :-)
>>
>> Thanks,
>>
>> 	-- Mark
>>
>> _______________________________________________
>> MacOSX-dev mailing list
>> MacOSX-dev at omnigroup.com
>> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
>
>
>
>
>- Johannes Huning.
>
>
>
>
>
>


More information about the MacOSX-dev mailing list