• 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
Loading Cocoa Bundles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading Cocoa Bundles


  • Subject: Loading Cocoa Bundles
  • From: Chaz McGarvey <email@hidden>
  • Date: Fri, 25 Feb 2005 10:39:12 -0700

Hello list:

I am trying to dynamically load a bundle (for a plugin architecture) using NSBundle, but it fails to load. Here is the loading code I'm using:

// load plugin
		if ( !bundle ) {
			NSLog( @"no bundle.." );
		}
		if ( ![bundle load] ) {
			NSLog( @"bundle didn't load" );
		}
		_pluginClass = [bundle principalClass];
		// now instantiate, etc.
// end

I get "bundle didn't load." I'm pretty sure the loading code isn't the problem. I made sure to give the full path to the bundle, and the path is definitely correct, so the NSBundle object is 'correct.' It just won't load.

So I guess the problem must be the bundle I'm trying to load, but I don't see what could be the problem. I have a principal class set, I have the bundle identifier set, etc. I followed the directions exactly from the Dynamic Loading documentation.

So my questions are how can I debug this, and are there any gotchas when creating loadable bundles?

Thanks very much,
chaz

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Loading Cocoa Bundles
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Re: How to know a file is writeable?
  • Next by Date: Re: NSTask not using arguments?
  • Previous by thread: Re: Toolbar Item Label Refresh
  • Next by thread: Re: Loading Cocoa Bundles
  • Index(es):
    • Date
    • Thread