We need to set a cookie locally to the application that applies to our webview. We referenced this post. All we need is to inject a cookie. When running on the simulator everything works perfect, but when using a device the cookie fails to inject. This is the code we have so far.
let userContentController = WKUserContentController()
let cookieScript = WKUserScript(source: "document.cookie = 'customCookie'; domain = '.example.com'", injectionTime: .AtDocumentStart, forMainFrameOnly: false)
userContentController.addUserScript(cookieScript)
let webViewConfig = WKWebViewConfiguration()
webViewConfig.userContentController = userContentController
self.webView = WKWebView(frame: CGRectZero, configuration: webViewConfig)