• 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: Get the package's NSBundle from a plugin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get the package's NSBundle from a plugin


  • Subject: Re: Get the package's NSBundle from a plugin
  • From: Luke Bellandi <email@hidden>
  • Date: Fri, 13 Apr 2007 08:08:24 -0700

Hi Mike,

What exactly are you trying to do here that you need the package's bundle for?

- Luke

On Apr 13, 2007, at 5:36 AM, Stéphane Sudre wrote:

Why wouldn't it work (if you replace Class with class)?

You probably have at least one subclass of the Installer Plugins classes. If you run this method on an instance of this subclass, you will get the NSBundle of the plugin.

Then you would just have to build the path of the metapackage "bundle" from the path of the plugin bundle (+[NSBundle bundleWithPath:]).



On Apr 13, 2007, at 5:02 AM, Mike wrote:

That would be a neat trick but in this case it won't work because self is an InstallerPane which is a member of an InstallerSection which is an NSView in the class object.

Thanks,

Mike

Peter Bierman wrote:
At 6:01 PM -0700 4/12/07, Mike wrote:
Is there an easy way to get the NSBundle of the .mpkg that contains a plugin from the plugin's code?

I see the InstallerSection class has a -bundle method but it appears to return the plugin's bundle, not the bundle of the .mpkg itself. This also doesn't seem to be mentioned in Software Delivery Guide.
A useful NSBundle trick for plugins everywhere:
[NSBundle bundleForClass:[self Class]]
This should find you the bundle that whatever class you're in came from.
-pmb
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
---------------------------------------------------------------------------------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte.





_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev 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. Installer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Get the package's NSBundle from a plugin
      • From: Mike <email@hidden>
References: 
 >Get the package's NSBundle from a plugin (From: Mike <email@hidden>)
 >Re: Get the package's NSBundle from a plugin (From: Peter Bierman <email@hidden>)
 >Re: Get the package's NSBundle from a plugin (From: Mike <email@hidden>)
 >Re: Get the package's NSBundle from a plugin (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Changing the default installation location dynamically
  • Next by Date: Re: Get the package's NSBundle from a plugin
  • Previous by thread: Re: Get the package's NSBundle from a plugin
  • Next by thread: Re: Get the package's NSBundle from a plugin
  • Index(es):
    • Date
    • Thread