Does a Category applied to NSString also apply to NSCFString via the "toll-free bridge"?
Posted
by half_brick
on Stack Overflow
See other posts from Stack Overflow
or by half_brick
Published on 2010-04-26T04:26:26Z
Indexed on
2010/04/26
4:33 UTC
Read the original article
Hit count: 209
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.
© Stack Overflow or respective owner