Modify URL Before Loading Request in UIWebView
I created a native app from my web app using UIWebView . My webapp is a basic CMS with some static pages, some category pages and and some detail pages. Now I need to check if the request comes from the web app or the native app. To do this I have two possibilities: First solution: Modify URL and check URL on server side: @IBOutlet var WebView: UIWebView! override func viewDidLoad() { super.viewDidLoad() loadWebPage() } func loadWebPage() { let url = NSURL(string: "http://localhost:8888?apptype=native") let request = NSURLRequest(URL: url!) WebView.loadRequest(request) } When I check on server