Don't do this:
NSString *escaped = [path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
CFStringRef escaped = CFURLCreateStringByAddingPercentEscapes(NULL,
Because stringByAddingPercentEscapesUsingEncoding alone does not strictly conform to what can be escaped in arguments and you may end up with skipped, unencoded characters in your string. That would result in a malformed URL with incorrect parameters.
That would result in great sadness. And probably sadness as well.