Here is my code
CFStringRef escapedStr;
  escapedStr = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                                       originalString,
                                                       leaveUnescaped,
                                                       kCharsToForceEscape,
                                                       kCFStringEncodingUTF8);
The Error is:
CFURLCreateStringByAddingPercentEscapes is deprecated in ios 9.0, use stringByAddingPercentEncodingWithAllowedCharacters which always uses recommended UTF-8 settings.
Could somebody help with how to replace CFURLCreateStringByAddingPercentEscapes with stringByAddingPercentEncodingWithAllowedCharacters in above code.
                        
use below code maybe its helped