Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bundleWithIdentifier: failures




On Dec 29, 2007, at 9:12 AM, glenn andreas wrote:


On Dec 29, 2007, at 8:30 AM, Ricky Sharp wrote:

I'm being floored by an issue where NSBundle's bundleWithIdentifier: is failing to load one of my frameworks.


There's the problem. bundleWithIdentifier doesn't load frameworks:

Returns the previously created NSBundle instance that has a given bundle identifier


So the framework need to be loaded implicitly (via dyld's app launching process) or explicitly (by using NSBundle's bundleWithPath:)


Thanks for this info; all is now well.

I also found the reason why the first call to bundleWithIdentifier: was working. It was that, for whatever reason, the first images framework was being loaded. Perhaps it's Xcode that loaded it. But strange that the sister project that built the second images framework kept the framework unloaded. None of my apps or Plug-Ins link to this framework; it's just a common storage location for images.

Anyhow, I'm now explicitly accessing the frameworks via bundleWithPath: And, because all I'm accessing is image resources, I need not load the framework.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >bundleWithIdentifier: failures (From: Ricky Sharp <email@hidden>)
 >Re: bundleWithIdentifier: failures (From: glenn andreas <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.