on following code i'm get the error message: Implicit conversion of 'NSStringEncoding' (aka 'unsigned long') to 'NSCharacterSet * _Nonnull' is disallowed with ARC
Where i'm making wrong?
NSURL *candidatesURL = [NSURL URLWithString:[str_url
stringByAddingPercentEncodingWithAllowedCharacters:NSUTF8StringEncoding]];
You are using the wrong method. Instead of using
stringByAddingPercentEncodingWithAllowedCharactersuse thisstringByAddingPercentEscapesUsingEncodingIf you wan't to use this method
stringByAddingPercentEncodingWithAllowedCharactersyou have to pass a set of allowed characters.Try this.
Or if you app development target is IOS 9.0 and above.
stringByAddingPercentEscapesUsingEncodingis deprecated so you can usestringByAddingPercentEncodingWithAllowedCharactersand useURLHostAllowedCharacterSet.