CFURLCreateStringByAddingPercentEscapes and CFURLCreateStringByReplacingPercentEscapesUsingEncoding are deprecated as of iOS 9.0. The recommended replacements are -[NSString stringByAddingPercentEncodingWithAllowedCharacters:] and -[NSString stringByRemovingPercentEncoding] which are both available starting in iOS 7.
RFC 3986 Section 2.3 specifies the unreserved characters for URIs, namely ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~. This is probably a reasonable set to pass to -stringByAddingPercentEncodingWithAllowedCharacters:.
Pull request forthcoming…