You should not allocate the NSDictionary
you pass to this method. What you want is:
NSDictionary* documentAttributes;
NSAttributedString* attrStr = [[NSAttributedString alloc] initWithData:data options:nil documentAttributes:&documentAttributes error:NULL];
It is passing documentAttributes
to you. You don't pass the attributes to it.