• 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: Embedding a Framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding a Framework


  • Subject: Re: Embedding a Framework
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 25 Jul 2014 12:58:12 -0500

On Thu, Jul 24, 2014, at 06:51 PM, Roland King wrote:
>
> > On 24 Jul 2014, at 11:50 pm, Jerry Krinock <email@hidden> wrote:
> >
>
> > If I understand you correctly, you are shipping your framework in the Contents/Frameworks/ subdirectory of the application package.  I have apps which work the same way.  When I otool -l their binaries, I get:
> >
> > Load command 11
> >          cmd LC_LOAD_DYLIB
> >      cmdsize 96
> >         name @executable_path/../Frameworks/Bkmxwork.framework/Versions/A/Bkmxwork (offset 24)
> >   time stamp 2 Wed Dec 31 16:00:02 1969
> >      current version 1.0.0
> > compatibility version 1.0.0
>
> Right, that’s what I wanted mine to say, not
> /Library/Frameworks/pcapng.framework/… but @rpath/pcapng.framework. So
> the question was why does yours link as an executable path relative and
> mine as a full path name?

Probably Xcode 5 vs. Xcode 6.

Xcode's build system sets the install name of the dylib to the value of
the LD_DYLIB_INSTALL_NAME build setting. The default variable of this
build setting is
"$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)".

The default value for DYLIB_INSTALL_NAME_BASE is "$(INSTALL_PATH)", so
$(LD_DYLIB_INSTALL_NAME) expands out to
"$(INSTALL_PATH:standardizepath)/$(EXECUTABLE_PATH".

The Xcode 6 framework target template now sets DYLIB_INSTALL_NAME_BASE
to "@rpath", which affects $(LD_DYLIB_INSTALL_NAME) and thus the install
name used by the build system.

> So now I have a framework I need to link differently for embedding than I
> do if I want to install it.

1) Do you ever really want to install the framework?

2) The advantage of @rpath is that it works wherever the library is
placed. So even if you _do_ want to install the framework at
$(INSTALL_PATH), using @rpath should be just fine.

--Kyle Sluder

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Embedding a Framework (From: Roland King <email@hidden>)
 >Re: Embedding a Framework (From: Jerry Krinock <email@hidden>)
 >Re: Embedding a Framework (From: Roland King <email@hidden>)

  • Prev by Date: Re: How do you get Xcode to symbolicate an OS X crash report?
  • Next by Date: App helpbooks
  • Previous by thread: Re: Embedding a Framework
  • Next by thread: How do you get Xcode to symbolicate an OS X crash report?
  • Index(es):
    • Date
    • Thread