• 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: PrefPane with embedded App - Shared Resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PrefPane with embedded App - Shared Resources


  • Subject: Re: PrefPane with embedded App - Shared Resources
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Mon, 2 Mar 2009 16:01:35 -0300

At 09:47 -0800 02/03/09, email@hidden wrote:
>From: Tobias Zimmerman <email@hidden>
>]Date: Mon, 02 Mar 2009 10:51:06 -0500
>Message-ID: <C5D16A9A.1346F%email@hidden>
>
>Right now, I am embedding the app in the 'pane using a "copy files" phase in the build.  However, this results in two separate Resource directories (one at the 'pane level  and one inside the app bundle).  I would like the app and the 'pane to share resources.
>
>I am at a bit of a loss as to the best way to do this and how to actually set it up in Xcode.  The two options I see are (1) build the executable of the app at the same level as the 'pane; or (2) symlink the app's "Resources" directory to the higher level "Resources" directory of the 'pane.
>
>My question: which is the better method (if either), and how do I actually accomplish it in Xcode?  I would like a solution that works transparently across build configurations so I don't have to remember extra build steps when switching between Debug and Release.

That's exactly what I had to do in the current version of Klicko (http://www.brockerhoff.net/klicko). The embedded app has a _relative_ symlink to the Resource folder it itself is contained in.

In your build script, include a line like this:
ln -fs "../../../Resources" "$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/HelperApp.app/Contents/Resources"

However. If you codesign your helper app _and_ pref panel (you probably should, and in that order) be sure to review TechNote 2206 - it recommends a different arrangement, but I found this one works well. One the product page I link to, above, I give show how to verify the signature - check out both the panel and the app.

HTH,
--
Rainer Brockerhoff  <email@hidden>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
 In their own business even sages err."
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
 _______________________________________________
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

  • Prev by Date: Re: variable viewing in gdb window
  • Next by Date: memory leaks and C++
  • Previous by thread: PrefPane with embedded App - Shared Resources
  • Next by thread: Re: Subversion doesn't appear to see class files in Xcode
  • Index(es):
    • Date
    • Thread