iOS9.0 以后转码函数stringByAddingPercentEscapesUsingEncoding已经被废弃了。

替换方法是:

stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding

修改为

stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]