iOS12AdaptationTips icon indicating copy to clipboard operation
iOS12AdaptationTips copied to clipboard

UIWebView deprecated

Open ChenYilong opened this issue 7 years ago • 2 comments

64dfd849ly1fwhz9yqu9ej20yi4eyttf 64dfd849ly1fwhza02ylyj20yi5vn4mn

ChenYilong avatar Oct 23 '18 03:10 ChenYilong

https://forums.developer.apple.com/thread/109515 我们在线上环境iOS12以及以上的版本遇到了链接里面的这个问题

itdongbaojun avatar Oct 23 '18 05:10 itdongbaojun

- (void)webViewDidFinishLoad:(UIWebView *)webView {  

   NSCachedURLResponse *cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:webView.request];  

}  

在iOS低版本上 正常使用NSURLCache 可以通过 cachedResponseForRequest:webView 获取到缓存的 response,但是在iOS12上 返回为 nil , 在 苹果的问题列表上也有相同的bug提问,这里记录一下

https://forums.developer.apple.com/thread/108338

ChenYilong avatar Nov 12 '18 15:11 ChenYilong