FileReader onload/onloadend/onerror not fire on ios


#1

FileReader’s event handlers (e.g. onload, onloadend, onerror) cannot be fired on ios, but work on mac safari when in mode of ionic serve. Furthermore, same issue happens when using cordova-plugin-file and ionic-native/file, so that then()/catch() also cannot be fired on ios.

This problem blocks my project.
S.O.S


#2

You have to remove the application from the device, and you must enable the permissions again.


#3

Having removed app, only the error thrown by the first called function can be caught. But then neither then() nor catch() of any file function works.


#4

And what permissions need enable?


#5

Referring to this comment, the solution is to re-order the index.html of your app so that the polyfills.js (which includes zone.js and a few other things) is included before cordova.js.
Joe’s comment


#6

Aha, so does it. Thx a lot!


#7

Thx a lot. You save my life!!!