While working on a rather simple app today I ran into an odd issue that I think is due to using live reload in the CLI. My demo simply used the Camera plugin to display the picture in the dom. My initial code was using an array and a list, and when things started to fail, I went to something super simple to try to figure out why it was failing:
var image = document.getElementById('myImage'); image.src = imageUri;
While remote debugging, I got: Not allowed to load local resource:
That didn’t quite make sense to me. I’ve used fileUris in camera demos many times before. I even tried copying my own super simple demo from here, https://github.com/cfjedimaster/Cordova-Examples/tree/master/basic_camera, and that failed too!
Then on a whim I tried something. I had been using: ionic emulate ios (and android) -l -c. I tried cordova emulate ios and it worked! I then tried ionic emulate ios and it worked too.
So the issue seems to be live reload (or maybe console logging) that is breaking the ability to use file URIs for images in the dom.