Re: Get write authorization
Re: Get write authorization
- Subject: Re: Get write authorization
- From: Kyle Sluder <email@hidden>
- Date: Mon, 18 Nov 2013 00:31:47 -0800
> On Nov 17, 2013, at 11:35 PM, Livio Isaia <email@hidden> wrote:
>
>
>>> On Sun, Nov 17, 2013, at 10:41 PM, Livio Isaia wrote:
>>> Hi all.
>>>
>>> I have a simple cocoa app (Mac OS X 10.9) that must install (or remove) a
>>> framework to system/library/Frameworks.
>>
>> Why? /System is for OS-provided components only. You should only install
>> your frameworks to /Library/Frameworks.
>>
>> --Kyle Sluder
>
> Because the apps that need the framework seem not to find it there…
>
> May be they need a particular search path specification when building?
Yes, they do.
When an app is built, the search path for each of its dynamically linked libraries is copied from the library it’s linked against and baked into the app’s load commands.
Thus, to influence where the app looks for its libraries, it is necessary to modify the Install Name of the library. You can find this setting in the Build Settings pane of your library’s target, or you can modify it after the fact using install_name_tool.
There are special tokens that make the install name very powerful: “@executable_path”, “@loader_path,” and “@rpath.” These are documented at the bottom of the dyld man page.
The bottom line is that if you correctly configure your library target, then rebuild your app against these properly-configured libraries, your app will be able to find them in any reasonable spot at launch time—most preferably inside your app bundle.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden