title: Create a unique identifer in a webview
body: <p>Go easy on me I am new to I OS and Swift :). I am trying to create a IOS app using swift. I have a web view display that is working correctly, displaying the website. YAY!!
   What I need to do now is create a unique identifier that is stored locally and when the app is opened is sent to the remote server. I see i can use this...</p>
  
  <pre><code> UIDevice.currentDevice().identifierForVendor!.UUIDString
  </code></pre>
  
  <p>However i would like to store it locally for future use and send it to the remote server every time the app is opened. I have done research on this and have come upon answers for other objects just not a web view.</p>
  
  <p>If someone knows of a tutorial or example code for this solution i would greatly appreciate it. </p>
  
  <p>UPDATE</p>
  
  <pre><code>  let uuid = UIDevice.currentDevice().identifierForVendor!.UUIDString
  </code></pre>
  
  <p>and for the url im using </p>
  
  <pre><code>  let url= NSURL (string:"https://example.com");
  </code></pre>
  
  <p>Could i do something like this? Or like it?</p>
  
  <pre><code>let url= NSURL (string:"https://example.com");
  
    let requestobj= NSURLRequest(URL:url! ADD VAR HERE? );
  </code></pre>
  
  <p>Where ADD VAR HERE is the uuid to pass to the server which i can catch with a php script? </p>
  
  <p>Latest update..</p>
  
  <p>Im having a hard time integrating that into my existing code. Where would be the best place to put it?</p>
  
  <pre><code> import UIKit
  
  
  class ViewController: UIViewController {
  
  let uuid = UIDevice.currentDevice().identifierForVendor!.UUIDString
  
  @IBOutlet weak var WebView: UIWebView!
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  
             let url = NSURL (string: "https://example.com");
      let requestObj = NSURLRequest(URL: url?)
  
      WebView.loadRequest(requestObj);
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  
   }
  </code></pre>