Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swift 来自UIWebView缓存的Gat OAuth令牌_Swift_Oauth_Uiwebview_Nsurlcache_Nshttpcookie - Fatal编程技术网

Swift 来自UIWebView缓存的Gat OAuth令牌

Swift 来自UIWebView缓存的Gat OAuth令牌,swift,oauth,uiwebview,nsurlcache,nshttpcookie,Swift,Oauth,Uiwebview,Nsurlcache,Nshttpcookie,我在我的应用程序中演示UIWebView,我需要在客户端登录后获取存储在设备缓存中的OAuth令牌,但我不知道如何获取 我尝试搜索cookie,但没有得到结果 for cookie in NSHTTPCookieStorage.sharedHTTPCookieStorage().cookies!{ var C:NSHTTPCookie = cookie as NSHTTPCookie println("\(cookie.name)\n") } 感谢您的帮助。您是说您已从服务

我在我的应用程序中演示UIWebView,我需要在客户端登录后获取存储在设备缓存中的OAuth令牌,但我不知道如何获取

我尝试搜索cookie,但没有得到结果

for cookie in NSHTTPCookieStorage.sharedHTTPCookieStorage().cookies!{

    var C:NSHTTPCookie = cookie as NSHTTPCookie

    println("\(cookie.name)\n")
}

感谢您的帮助。

您是说您已从服务器请求令牌,并试图获取令牌和令牌密钥,还是说您已通过身份验证并将作为第二次返回webView?已通过身份验证并将第二次返回webView。