Here is the situation:
We have a custom eReader that lives in our assets folder.
When we want to download an eBook from our server and read it, we download the file and save it using the Native File plugin.
When we start up the reader, we send it the container in which we want the reader to be created and built, and an internal url to the file resource we want to read.
After window.Ionic.WebView.convertFileSrc, the file ref looks like:
The reader will then build the iframe and send a simple XMHttpRequest to the provided url, then place the resulting html into the iframe.
The problem is that it only works on first load of the eBook from our server
I can see the file being downloaded, and written to its own folder in the apps file system (File.dataDirectory).
When I debug the XMLHttpRequest in our eReader.js, I can see the call being made to the resource and the HTML returning to the request, which is then rendered on the page.
BUT, if I close the app, reopen it, and try to access the already-downloaded book, the XMLHttpRequest in our eReader.js returns nothing.
I can verify that the file exists at the resource location after a reload, but the XMLHttpRequest acts like it cannot find anything at the provided location.
AND, this is only on iOs. Android works as intended.
My questions is, what am I missing? Is this something to do with the iOs permissions or persistence?
Any help would be appreciated.