Since class_poseAs(..) is deprecated in Objective-C 2.0, I need to find another way to change the class of an object at runtime. I've found I can change an object's class using object_setClass(..). My problem now is finding all the current instances of a given class in order to update them.
A solution would be to maintain a global dictionary of the instances I want to potentially update, but I'd like to know whether there's already a way to obtain such a collection from the reflective api.
I checked Apple's Runtime reference and I cannot find anything useful. Updating just the method of a class with method_exchangeImplementations(..) is not a solution for me since I want to be able to reuse the old implementation by using super.