I am trying to load a large Keynote file (~150MB) into a UIWebView
and I keep getting memory warnings and my app crashes.
Is there a way around this?
What is the proper way to open files that are this large without opening them in another app?
When you open a file in UIWebView
directly from the url, the downloaded content is stored temporarily in RAM. The RAM is a shared space for the whole device, which has to perform other OS related tasks. Hence Your app is being killed by iOS due to memory pressure & resource crunch.
It is advisable to directly write your content into the file in NSDocumentsDirectory
in background & load the file in UIWebView
later.
With my knowledge I can suggest you the following.
The download Part
The Preview Part
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With