pwlin / cordova-plugin-file-opener2

A File Opener Plugin for Cordova
MIT License
314 stars 584 forks source link

In iOS, not able to open .epub and .mobi file using file opener plugin #223

Open Topiya opened 5 years ago

Topiya commented 5 years ago

Hello,

I want to open .epub and .mobi files using file-opener plugin of Ionic-cordova in iOS app. But while doing this I am getting below error.

can not handle uti

Can anyone please help me to solve this error?

godoyrw commented 5 years ago

See this... https://github.com/pwlin/cordova-plugin-file-opener2/issues/2

Topiya commented 5 years ago

@godoyrw Can you please recheck the given URL because it is not working.

godoyrw commented 5 years ago

It's ok now! Sorry!

shnist commented 5 years ago

@Topiya did the suggestions in that issue resolve your issue?

Topiya commented 5 years ago

@shnist No, It didn't solve my issue. Is there any other workaround for this issue?

shnist commented 5 years ago

@Topiya can you provide a code snippet from your project? This will help diagnose the issue. One thing you can try, if you haven't done so already, is to try and provide the relevant MIME type (https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types). So for example, an .epub file would look something like:

cordova.plugins.fileOpener2.open('file.epub',  'application/epub+zip', {  error : function(){ },   success : function(){ } });
prasadpandari commented 5 years ago

Anyone able to find a solution for this. I have same issue. cordova.plugins.fileOpener2.open( dirEntry.nativeURL + fileName, mimetype, { error: (e) => { console.log(Error status: ${e.status} - Error message: ${e.message}); }, success: () => { })

Iam getting "Error status: 9 - Error message: Could not handle UTI

Pawel86400 commented 3 years ago

Any idea what can cause this error and how to solve it?

My MIME type is application/pdf. Surprisingly only 1 user out of many is experiencing this issue on iPhone 7 Plus.

Unfortunately I'm not able to reproduce it on other devices or in the simulator.