• 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: Cross-project reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-project reference


  • Subject: Re: Cross-project reference
  • From: Preston Jackson <email@hidden>
  • Date: Mon, 24 Nov 2008 08:40:41 -0700

Hi Luke,

I believe your problem is that you are not sharing the build locations of your two projects. The build directories (and even the build configuration names) must be the same, or Xcode can't find the framework and put it into your application.

You have all sorts of build directory settings at your disposal. They can be set in the project or in the Xcode preferences. You need to customize the build directory to be in a shared location.

Hope that helps,
Preston

http://sidelightblog.blogspot.com


On Nov 23, 2008, at 8:36 PM, Luke Evans wrote:

Hello fellow xcoders.

I've been happily using xcode for a while now, but recently decided to take the plunge and set up an automatic dependency between a main project and a framework project. Up until now I've built the framework project by hand and manually recopied the resulting framework 'product' into the dependee application project.

So, I read the docs about making project dependencies and it sounded beautifully straightforward. This lead me to:
- Drag and drop my framework project file into the application project "Groups and Files"
- Drag the framework that appeared as a 'product' under the resultant project icon to the relevant "Copy Bundle Resources" and "Link Binary" stages of the application project build - as I want this to be a private framework in the app bundle
- Add the framework beneath the application target, to create the build dependency


So far so good, and the dependent project rebuilt as expected if it needed to when I built the application.

However, when I tried to import a header from the framework and use a method in the application code, I got an error: the header was not found. This conflicted somewhat from the xcode docs that essentially say that "all headers in the project are automatically located".

Now, it struck me that, ordinarily, you would have to "add existing framework" to a project to have it added to the "Frameworks" group (normally) and have its internal public headers made available to the project. If I do this, and point directly to where the (debug) framework gets created, then the application project does indeed build. However, if I don't have this extra reference, it appears that it is _not_ sufficient to merely have the framework there by virtue of it being a product under the project reference that I included.

I know I must be missing something here, as my 'workaround' is clearly wrong (I'm having to manually locate a _particular_ build, debug or release, which is fragile at best). I really had the impression that simply dropping a dependent project into a dependee would have it automatically add the dependent headers to the dependee's header search path. However, clicking on the icon of the framework that appears under the referenced project icon does not show the header files as it does when you click on a framework included by other means.

Anyway, at this point, I'm hoping that someone can put me straight with a simple "Oh you forgot to twiddle the doobrey here" type comment.

Thanks

Luke

_______________________________________________
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

_______________________________________________ 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:
    • [RESOLVED] Cross-project reference
      • From: Luke Evans <email@hidden>
References: 
 >Cross-project reference (From: Luke Evans <email@hidden>)

  • Prev by Date: Re: Annoying Document Window Behavior
  • Next by Date: Re: Examining RTF
  • Previous by thread: Cross-project reference
  • Next by thread: [RESOLVED] Cross-project reference
  • Index(es):
    • Date
    • Thread