EDIT:
I also tried to add/configure Content-Security-Policy (<meta> in the index.html) & add/configure cordova-plugin-whitelist (<allow-xxx ...> in the config.xml) without any success.
When you changed the path were you able to get the picture or file? I used the normailzeURL like you did and got the same results. I ended up just sub-stringing it to get what I wanted, but I still get an error when accessing files or pictures… domain=pluginkit code=13 query cancelled userinfo= nslocalizeddescription=query cancelled
I’ve the same problem from the last update of plugin webview <plugin name="cordova-plugin-ionic-webview" spec="^3.1.1">
normalizeUrl() was replaced by convertFileSrc(). It works well on android real device but fails on iOS for me.
So i’m still stucked (i’m using file plugin to read a local video without issue but when i’m trying to display this video “sanitized” link in a videogular or html5 element, it fails on iOS.
let win: any = window; // hack compilator
let safeURL = win.Ionic.WebView.convertFileSrc('file:///myFile/....');
@lucbonnin I have the same problem using these convertFileSrc URLs and even after adding ionic: to the index.html content-security-policy meta tag, videos with a src like below will still not play:
@lucbonnin did you find any solution ?
When I use <preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
in config.xml, my app does not work. Process is stopped after splashcreen display.
thank you so much for this answer, i have been doing thousands of shits to solve this problems, sanititzation, splitting, directory of file and nothing worked. This worked for me!!!
Thanks