• 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
How can a plug-in bundle get access to its own resources?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can a plug-in bundle get access to its own resources?


  • Subject: How can a plug-in bundle get access to its own resources?
  • From: Motti Shneor <email@hidden>
  • Date: Tue, 10 Nov 2009 06:45:25 -0500
  • Acceptlanguage: en-US
  • Thread-topic: How can a plug-in bundle get access to its own resources?

Hi.

This may seem a silly question, but I cannot find any decent way for my Plug-In bundle code to access its own resources!

The host application that loads my plug-in bundle does not pass me any NSBundle* or CFBundleRef, and I am wondering is there a complement to the [NSBundle mainBundle] for plug-in bundles (or actually any other bundle containing dynamically loaded code).

All the resource-locating API's need a bundle reference of some kind, and I don't have it!

* I can't hard-wire a path string to get the bundle from, because I don't know where I'm installed.
* I can't also use the bundle identifier, because it is in the bundle too, which I don't have!
* I can't  use the principal class to get hold of the bundle, because I create many plug-ins, all using the same class, and Obj-C has no name-spaces, so the API  [NSBundle bundleForPrincipalClass] gives me wrong bundles.

Is there a way out? Is there any trick, or technique to work around this bizarre deficiency of the Bundle mechanism?

Any hint will be appreciated.

Motti Shneor
------------------------------------------
Senior Software Engineer
Waves Audio ltd.


_______________________________________________

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

  • Follow-Ups:
    • Re: How can a plug-in bundle get access to its own resources?
      • From: Benjamin Miller <email@hidden>
    • Re: How can a plug-in bundle get access to its own resources?
      • From: Benjamin Miller <email@hidden>
  • Prev by Date: View swap using "push" animation
  • Next by Date: Adding a vertical scrollbar to a multiline textfield
  • Previous by thread: Re: View swap using "push" animation
  • Next by thread: Re: How can a plug-in bundle get access to its own resources?
  • Index(es):
    • Date
    • Thread