Does a Category applied to NSString also apply to NSCFString via the "toll-free bridge"?
- by half_brick
We're integrating a library into an iPhone app which appears to use the google toolbox for iPhone internally.
The google toolbox adds a method gtm_stringBySanitizingAndEscapingForXML to NSString.
The problem is, whenever we attempt to make a call to this library we get
[NSCFString gtm_stringBySanitizingAndEscapingForXML]: unrecognized selector sent to instance 0x272478
So it appears the library is calling that method on a NSCFString, to which the category does not apply.
So... is it the case that the category will not apply across the toll-free bridge to CoreFoundation classes?
If that's the case then we at least know why it's blowing up. Figuring out how to fix it is a different matter.