Description
Bug Report
After migration from cordova-ios-5.x to cordova-ios-6.x we now see that the cordova no longer support reading files in chunks. Instead the whole file is loaded into memory, which will limit file access to what is available on your device.
Problem
After what I can see, it looks like CDVURLSchemeHandler is handling access of local files in a cordova app, and it does not support delivering files with range headers so WKWebView don't need to load the whole file at once.
What is expected to happen?
Earlier with UIWebView we did not experience this so I guess that cordova on UIWebView handled this by reading these files in chunks. (Or it was packed with the default file-reading that UIWebView had)
What does actually happen?
Running simulator or a device attached to xcode we see a memory spike at the same size as the file you try to access. If you are on a device that can not handle this, it will result in a restart of the webview.
Information
Think the same problem is reported here for cordova-plugin-ionic-webview
Version information
cordova-ios@6.1.1
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above