I have an ARC project setup in xcode. To that project I added a non-arc static library. Everything works and builds find. When I run the project I get this error.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString encodedURLParameterString]: unrecognized selector sent to instance 0x4a030'
from this code:
NSString * value = [params objectForKey:key];
[_params setObject:[value encodedURLParameterString] forKey:key];
that's trying to call this
@implementation NSString (OAURLEncodingAdditions)
- (NSString *)encodedURLParameterString {
NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)self,
NULL,
CFSTR(":/=,!$&'()*+;[]@#?"),
kCFStringEncodingUTF8);
return [result autorelease];
}
@end
The error seems to be saying that it can't find this function. Of course it compiles just fine and I can jump to the definition just fine. The string value is a constant string which of course inherits from NSString. This works just fine in the other project that I pulled it from. It finds this function perfectly so as an Xcode newbie I'm at my wits end.
The file is included in the compile sources. There aren't any errors and it compiles and runs other code just fine. I seem to be missing one small part and I just can't understand what it is. If you can help please do.