• 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
Bundle Reloading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Bundle Reloading
      • From: glenn andreas <email@hidden>
    • Re: Bundle Reloading
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: How to trim a bezier path?
  • Next by Date: Re: How to trim a bezier path?
  • Previous by thread: Re: How to trim a bezier path?
  • Next by thread: Re: Bundle Reloading
  • Index(es):
    • Date
    • Thread