normalizeURL depricated, cannot get WebView convertFileSrc to work

Hi there, I opened my app today and it crashed, saying normalizeURL is depricated use convertFileSrc instead.

So i tried to implement the WebView new method.

Its installed but gives this error - Cannot find the name WebView.
If anyone can assist i would be greatfull because our app relies on this functionality and it due for launch soon.

I even tried to manually change the url from ‘file:///’ to ‘/’ and from ‘file:///’ tp ‘http://localhost:8080’ with no luck

Thanks

Figured it out, with the new WebView v2 the normalizeURL is depricated, just had to roll back for this current app.

Thanks

You could also upgrade to v3 and use this small hack for the compilator regarding window.*

let win: any = window; // hack compilator
let safeURL = win.Ionic.WebView.convertFileSrc('file:///myFile/....');
3 Likes