Installed xcode 4.6 and now facing with new errors in an existing ent code I manage.
The compiler now complains about "direct access to objective-C's Isa is deprecated in favor of object_setclass () and object_getclass ()" And won't build
Ccessingisa
Has
Been deprecated for some time, the tools just didn't tell you this. Notably, it's been deprecated for at least as long as tagged pointers have existed in obj-C.
And yes,object_setClass()
Is
The appropriate replacement.
That said, why do you even need this? It's extremely rare that replacing the class of an object is appropriate, and the only valid case I can think of is when you're trying to dynamically subclass A class in order to inject new behavior into individual instances
Without modifying the class as a whole (which is, of course, something you probably don't need to do ).
Http://stackoverflow.com/questions/14590637/replacing-self-isa-because-of-xcode-4-6-deprecation