IOS 14 is working fine but not in IOS 12.4.9.
Please help!
_Originally posted by @yeshchaubey in https://github.com/VadimDez/ng2-pdf-viewer/issues/449#issuecomment-725895322_
Any errors or warnings in the console?
Thanks for response. No Any errors or warnings in the console.
ng2-pdf-viewer.js

pdf.js

Error on this.loadingTask.promise, onError emit undefined object. Tested on iOS 14
@VadimDez same for me, not rendering on iOS 12.4.9 on iphone 5s, any news about this? Thanks for help
@VadimDez please help.
I am interested in a solution too! Thanks.
You need to add the Promise.all polyfill:
if (!Promise.allSettled) {
Promise.allSettled = function (promises) {
let mappedPromises = promises.filter(o => !!o).map(p => {
return p.then(value => {
return {
status: 'fulfilled',
value
};
}).catch(reason => {
return {
status: 'rejected',
reason
};
});
});
return Promise.all(mappedPromises);
};
}
Note you also need to add it to the pdf.worker.min.js file. That, in turn, means you must host it locally so you can modify it.
Plus, make sure you're using zone.js 0.10.3. Older versions don't implementPromise.all`, and 0.11.3 breaks it again.
Most helpful comment
@VadimDez same for me, not rendering on iOS 12.4.9 on iphone 5s, any news about this? Thanks for help