Re: Framework Installation Directory
Re: Framework Installation Directory
- Subject: Re: Framework Installation Directory
- From: Jerry Krinock <email@hidden>
- Date: Sun, 10 Apr 2011 22:27:02 -0700
On Friday, April 8, 2011, Mr. Gecko <email@hidden> wrote:
> I need help with the Installation Directory for a framework that will be shared between a application and 2 daemons within side it. I think I may be able to do it if I were to have the 2 daemons executables in the MacOS path or another folder such as one named Daemons in the Contents folder. I am needing at least 1 of the daemons to be a bundle based daemon as it'll have some UI elements and such. The installation directory that I have been doing is "@executable_path/../Frameworks" which according to this, it'll go back 1 directory from the path of the executable and into the Frameworks directory to find the framework. The reason I am thinking in doing this as a framework is because some of the code I am using will be used in the daemons such as core code.
I have built an app like this and it works; however at the time, I was advised to put the Helper in Contents/Helpers instead of MacOS.
Read these:
http://www.cocoabuilder.com/archive/cocoa/233139-getprocessbundlelocation-no-good-in-background-agents.html#233141
http://lists.apple.com/archives/apple-cdsa/2009/May/msg00031.html
and there may be code signing implications too
http://developer.apple.com/library/mac/#technotes/tn2206/_index.html
Early on, test and see if +[NSBundle mainBundle] gives the expected result. It did not for me. After considering the various bad alternatives, I decided to do a method replacement on +[NSBundle mainBundle]. There may be a better alternative today.
_______________________________________________
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