I've been working with an application that creates an NSAttributedString
from an .rtf
file. I've been testing this app on iOS 7 with no problems. However, when I tested this app on iOS 6, I get this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteAttributedString initWithFileURL:options:documentAttributes:error:]: unrecognized selector sent to instance 0x9a77010'
Here's the code that I have:
NSError *error;
NSURL *stringURL = [[NSBundle mainBundle] URLForResource:@"Text" withExtension:@".rtf"];
NSAttributedString *myAttributedText = [[NSAttributedString alloc] initWithFileURL:stringURL options:nil documentAttributes:nil error:&error];