WKWebView Cache manifest not working IOS8 -
WKWebView Cache manifest not working IOS8 -
cache manifest works fine , events fired in safari in ios 8. not working @ in wkwebview else solve issue?
import uikit
import webkit
class viewcontroller: uiviewcontroller { @iboutlet var containterview : uiview! = nil var webview : wkwebview? override func loadview(){ super.loadview() self.webview = wkwebview() self.view = self.webview! } override func viewdidload() { super.viewdidload() var url = nsurl(string:"http://html5demos.com/offlineapp") var req = nsurlrequest(url:url) self.webview!.loadrequest(req) } override func didreceivememorywarning() { super.didreceivememorywarning() }
}
the application cache comes supported if utilize html5test.com
edit:
window.applicationcache not homecoming undefined either when loaded wkwebview
console.log("initializing page"); if (window.applicationcache == undefined){ console.log("application cache not suported!"); updatesplash(); } console.log(window.applicationcache); returns: domapplicationcache
edit 2:
if (typeof window.applicationcache.update === 'function'){ console.log("application has method update"); console.log(window.applicationcache.update); //shows swapcache() , update() methods window.applicationcache.update(); }
window.applicationcache.update() throws error: invalidstateerror: dom exception 11: effort made utilize object not, or no longer, usable.
just record, question appears have been asked on , linked apple developer forums. official response apple html5 application cache functionality not available in wkwebview:
the offline application cache not enabled in wkwebview. sense free request made available via https://bugreport.apple.com.
ios8 wkwebview
Comments
Post a Comment