title: No visible @interface for 'NSString' declares the selector URLEncodeUsingEncoding
body: <p>i am new to ios and objected C.</p>
  
  <p>I am trying to encode a url, bit i am getting the error </p>
  
  <blockquote>
    <p>/Users/zupportdesk/Desktop/MyIOSApps/ZDticketSystem/ZDticketSystem/ViewController.m:313:52:
    No visible @interface for 'NSString' declares the selector
    'URLEncodeUsingEncoding:'</p>
  </blockquote>
  
  <pre><code>#import "ViewController.h"
  #import "AppDelegate.h"
  #import "ApplicationEnvironmentURL.h"
  #import "AFNetworking/AFNetworking.h"
  #import "HHAlertView/HHAlertView.h"
  #import "MBProgressHUD/MBProgressHUD.h"
  #import "AppDelegate.h"
  
  
  @interface ViewController ()&lt;UITextFieldDelegate, UIActionSheetDelegate&gt; {
      ApplicationEnvironmentURL *applicationEnvironment;
      NSString *BASEURL;
      NSString *global_profileId;
      AppDelegate *delegate;
  }
  
  @property (nonatomic, strong) NSString *username;
  @property (nonatomic, strong) NSString *password;
  @end
  
  @implementation ViewController
  --- defaults methods here
  
  - (void)setupProfileidURL:(NSString *)profileToken {
      NSString *encoded_profileToken = [profileToken URLEncodeUsingEncoding:NSUTF8StringEncoding];
      NSString *user_login_url = [applicationEnvironment get_user_api_url];
      BASEURL = [[user_login_url stringByAppendingString:@"Account/GetProfileDetails?profileToken="] stringByAppendingString:encoded_profileToken];
      NSLog(@"Base URL: %@", BASEURL);
  }
  </code></pre>
  
  <p>I am calling the method like this
  <code>[self setupProfileidURL:profileToken];</code></p>
  
  <p><strong>View Holder header file</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface ViewController : UIViewController
  
  @property (weak, nonatomic) IBOutlet UITextField *tv_username;
  @property (weak, nonatomic) IBOutlet UITextField *tv_password;
  
  @end
  </code></pre>
  
  <p>I want to implement this <a href="http://This%20url%20encoding" rel="nofollow">https://madebymany.com/blog/url-encoding-an-nsstring-on-ios</a> . can some one help me with this url encoding.</p>