title: Stay logged in to a website loaded into a UIWebView
body: <p>I am building an app in iOS(swift) and Android, that loads a website in to a webview. The website requires a login and does not persist between uses. Is there a way to pass saved(locally) username and password to the site to be used to login</p>
  
  <p>iOS</p>
  
  <pre><code> import UIKit
  
  class ViewController: UIViewController, UIWebViewDelegate {
  
  
  
      @IBOutlet weak var webView: UIWebView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
  
  
  
          webView.loadRequest(URLRequest(url: URL(string: "https://greatanglers.com")!))
  
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  }
  </code></pre>
  
  <p>Android</p>
  
  <pre><code> protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      this.requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
      toolbar.setVisibility(View.INVISIBLE);
      ActionBar actionBar = getSupportActionBar();
      actionBar.hide();
  
  
  
      mWebView = (WebView) findViewById(webView);
  
      progressBar = (ProgressBar) findViewById(R.id.progressBar);
  
  
      mWebView.getSettings().setJavaScriptEnabled(true);
  
      mWebView.loadUrl("https://greatanglers.com");
  
  
  private class webViewClient extends WebViewClient {
  
  
      @Override
      public void onPageStarted(WebView view, String url, Bitmap favicon) {
          // TODO Auto-generated method stub
          super.onPageStarted(view, url, favicon);
      }
  
  
      @Override
      public boolean shouldOverrideUrlLoading(WebView webView, String url)
      {
          webView.loadUrl(url);
          return true;
      }
  
      @Override
      public void onPageFinished(WebView view, String url) {
          // TODO Auto-generated method stub
          super.onPageFinished(view, url);
  
          progressBar.setVisibility(view.GONE);
      }
  
  
  
  }
  </code></pre>
  
  <p>There isn't a lot of code to it just a simple load the webpage</p>