Bundle Loading/Unloading at runtime
Bundle Loading/Unloading at runtime
- Subject: Bundle Loading/Unloading at runtime
- From: Rahul Shetty <email@hidden>
- Date: Fri, 4 Jan 2008 21:49:26 +0530
Hi All,
We are developing an application that has to run on both Tiger and
the Leopard. The application has quite a few Cocoa bundles ,each
representing a separate service.
We have reasons to believe that the services that the bundles support
will undergo constant update. Hence we have a need to update the
bundles frequently through software update.
We want this update to take effect while the application is running.
However in terms of loading and unloading the bundles at run time, we
would like to have the following behavior:
1. We identify the bundle that is not busy and unload it.
2. We block all further calls to the bundle
3. We download the latest bundle
3. We load the new bundle in the place of the old one
4. All this happening in the background when the application is
running .
5. This is repeated for each of the bundle
The bundles contain mostly Objective-C code. We know that a Cocoa
loadable bundle cannot be unloaded (the documentation under "CFBundle
and NSBundle" talks about it) . This we believe is the crux of the
problem. We tried in vain to
move the Objective-C code to a carbon bundle and then use the CFBundle
calls to load/unload the bundle . We create an Cocoa object through a
function exported from the bundle and proceed
to access the services of the other Cocoa classes through this . We
are facing random crashes even in this method. This might be due to
the issue of the CFBundle being unable to
load and register all the Cocoa classes.
The harder option is to rewrite the bundle code in C++ and using
CoreFoundation classes. However, we would like to keep this as the
last option.
Can you provide us with any inputs into how we could go about solving
the issue?
Thank you.
Regards,
Rahul.
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________
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:
This email sent to email@hidden