• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Frameworks in the Helper LoginItems app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frameworks in the Helper LoginItems app


  • Subject: Re: Frameworks in the Helper LoginItems app
  • From: Roland King <email@hidden>
  • Date: Thu, 24 Dec 2015 08:27:30 +0800

> On 24 Dec 2015, at 07:36, Alex Kac <email@hidden> wrote:
>
> I’ve got an app with a helper in the Contents/Library/LoginItems path. Both use AFNetworking.framework. I currently install AFNetworking.framework in the main app’s Framework path. I would like the helper to use AFNetworking from the main app’s Framework’s folder.
>
> I’ve tried setting the run path search path to something like @executable_path/../../../../../Frameworks
>
> but it still doesn’t run - coming back to me with an error that it can’t load the dynamic library AFNetworking. As mostly an iOS developer for the last 8 years, how Xcode handles frameworks and how to get embedded stuff like this to work isn’t really something I have a lot of experience with. So I’m hoping perhaps someone has some help?


Works the same on OSX as iOS, which is rather helpful. Remember that @executable_path expands to the directory the executable is in, so you often need one less ‘..’ than you think. I believe that the executable_path for embedded helpers is sane (ie it’s the path to the helper) but I would check that.

Either way - find the helper, run ‘otool -L’ on it and see exactly what it prints out to make sure you’ve put the right bits in there, then go count double-dots. You can also use @loader_path which in many cases gives you the same thing as @executable_path but is better when frameworks link other frameworks as it gives you what you often really wanted. You can use @rpath too, but then you still have to work out what paths to embed in the binary to search which often ends up being @loader_path/../../something/else anyway, so you need to find the answer to your original question anyway.

In here are a load of environment variables you can set which spew information about dynamic loading, which may tell you what’s been tried and hence why it wasn’t found.

https://developer.apple.com/library/mac/technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391-CH1-SECDYLD <https://developer.apple.com/library/mac/technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391-CH1-SECDYLD>


_______________________________________________

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


References: 
 >Frameworks in the Helper LoginItems app (From: Alex Kac <email@hidden>)

  • Prev by Date: Frameworks in the Helper LoginItems app
  • Next by Date: Hurdles in converting to Swift
  • Previous by thread: Frameworks in the Helper LoginItems app
  • Next by thread: Hurdles in converting to Swift
  • Index(es):
    • Date
    • Thread