Bundle Reloading
Bundle Reloading
- Subject: Bundle Reloading
- From: "Josh Ferguson" <email@hidden>
- Date: Wed, 7 Dec 2005 08:44:25 -0600
- Thread-topic: Bundle Reloading
I know there has already been a lengthy thread on unloading/reloading a
bundle. Because of certain constraints, I need to be able to update and
reload a bundle at runtime. As it currently stands, my framework
downloads an update for itself to a temp directory, moves the old bundle
to the trash, and copies the new one to the new location. The class that
I need is loaded dynamically by creating an NSBundle instance using the
path to my class, then calling [NSBundle load] and NSClassFromString. It
seems, however, that the first loading of NSBundle is cached in memory.
When I go to load the bundle again (specifying the path to the new
bundle in the old location), it's still giving me the old bundle. I know
this because when I grab the CFBundleVersion from the plist it's giving
me the old version number.
My question is this: what do I need to change in the bundle
(CFBundleIdentifier? Class name? etc.?) to ensure that when I create the
NSBundle using -[NSBundle bundleWithPath], it actually reloads it in
memory?
Thanks!
Josh Ferguson
_______________________________________________
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