• 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: Copying dependent frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying dependent frameworks


  • Subject: Re: Copying dependent frameworks
  • From: Doug Hill <email@hidden>
  • Date: Mon, 21 Apr 2008 10:39:47 -0700

On Apr 19, 2008, at 7:26 PM, Jerry Krinock wrote:

I then click the triangle and disclose the framework icon.

I don't understand which "framework icon" you mean.

When you click the disclosure triangle for a dependent project added to another project, you get an icon for the target that will be built. I'm guessing it references a target but could be something else like the built Product. In my case, I get an icon for the framework that is being built for the dependent project. I can drag this icon into the "Link Binaries" build phase and it will indeed link my app with that framework. And it will even link to the correct configuration of what I'm building (Debug vs. Release). However, dragging the icon to the "Copy Files" build phase doesn't do what I expect. I tries to copy a correct Debug vs. Release but from the wrong location. Specifically it is trying to find the framework in the main application build folder. Don't know why, which is why I was hoping someone on this list had some idea what's going on. Since I've gotten one other replies (which was someone who gave me a pointer to your website earlier) I have to assume that what I'm trying to do doesn't work. Too bad since, if I didn't need to embed the dependent framework in my application bundle, the build would have worked nicely, particularly dealing with linking to the correct build configuration dependent frameworks (debug vs. release). So close.


I ended up writing a script to copy the framework into the application bundle, but there are a couple of problems I have. Primarily my script doesn't know about the dependent project build status so it can't tell if the project changed or not. So it always does the copy no matter whether the dependent framework changed or not. Most of the time it's a useless step.

But thanks for the feedback and the build script example. I'll go check it out.

Doug Hill


I drag this into my Link Libraries build phase and into a Copy Files build phase. When I do the build it links OK, but fails in the Copy Files build phase. It seems to be wanting to copy the dependent frameworks from my Application build folder rather than the framework build folder.

You should be dragging the framework ^product^, into Link Libraries and Copy Files, as you did later...


Looking at the Framework Programming Guide, it says to drag the icon for the dependent framework from it's project Products folder to the Copy Files build phase in the Application project. This works but will only copy the Debug version of my dependent framework rather than the correct one for the configuration I'm building.

For me, it always copies Release. I asked about this a few weeks ago but never got a response. I concluded that this is just the way Xcode works and that somebody smarter than me had a reason for designing it that way.


So, I would greatly appreciate any hints, tips, or pointers to info on how to do this correctly. It seems like I could create a script to do this, and reference the correct configuration build folder using $CONFIGURATION, but I'd rather have a Copy Files build phase instead.

Nope. A script is what I ended up doing. In the process, I scatched a few other itches too...


http://sheepsystems.com/sourceCode/sourcecpframeworks.html

_______________________________________________ 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
  • Follow-Ups:
    • Re: Copying dependent frameworks
      • From: Jerry Krinock <email@hidden>
References: 
 >Copying dependent frameworks (From: Doug Hill <email@hidden>)
 >Re: Copying dependent frameworks (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Using STL strings and supporting 10.2.x
  • Next by Date: Re: Using STL strings and supporting 10.2.x
  • Previous by thread: Re: Copying dependent frameworks
  • Next by thread: Re: Copying dependent frameworks
  • Index(es):
    • Date
    • Thread