Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the file does not open with its default app on IOS #272

Open
yoscar1 opened this issue Oct 10, 2019 · 6 comments
Open

the file does not open with its default app on IOS #272

yoscar1 opened this issue Oct 10, 2019 · 6 comments
Labels

Comments

@yoscar1
Copy link

yoscar1 commented Oct 10, 2019

Expected Behaviour

when you open the file that it opens with its default application, for example if it is an excell file that is opened with the ios excel application.

Actual Behaviour

In IOS when I try to open an .xlsx or .docx file, the plugin opens the file, the promise is executed correctly: but the file is not opened with the native app (in this case Excell or word) rather it opens as seen in the image below:
capture.png

Reproduce Scenario (including but not limited to)

I click on an .xlsx file, and instead of opening it with the excell app for ios that is already installed, it opens like the image above

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

IOS 13.1, iPhone 6s

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI info

cordova info

Here is the output:

Collecting Data...
Node version: v10.15.3
Cordova version: 8.1.1
Config.xml file:

ECOBPM ECOBPM app ECOBPM We need this to let you take pictures as notes We need this to let you pick photos from your library We need this to save the photos in your library We need this to let you know how close you are to a site Required to send your location to your dispatcher Plugins: cordova-annotated-plugin-android,cordova-play-services-version-adapter,cordova-plugin-actionsheet,cordova-plugin-analytics,cordova-plugin-android-permissions,cordova-plugin-androidx,cordova-plugin-androidx-adapter,cordova-plugin-badge,cordova-plugin-camera,cordova-plugin-datepicker,cordova-plugin-device,cordova-plugin-dialogs,cordova-plugin-file,cordova-plugin-file-opener2,cordova-plugin-file-transfer,cordova-plugin-filepath,cordova-plugin-inappbrowser,cordova-plugin-ionic-keyboard,cordova-plugin-ionic-webview,cordova-plugin-ios-camera-permissions,cordova-plugin-local-notification,cordova-plugin-mauron85-background-geolocation,cordova-plugin-media-capture,cordova-plugin-network-information,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-whitelist,phonegap-plugin-push,uk.co.workingedge.phonegap.plugin.launchnavigator iOS platform: Xcode 10.1 Build version 10B61

Plugin version

cordova plugin version | grep cordova-plugin-file-opener2

Here is the output:
cordova-plugin-file-opener2 2.2.1 "File Opener2"

Sample Code that illustrates the problem

this.fileOpener.open(this.dataFile.file.PathUri,this.dataFile.file.fileBlob.type).then(data=>{ console.log("se abrio el archivo",data); }).catch(error=>{ console.log("no se abrio el archivo con un app nativa",error); //intento abrirlo con el navegador this.loadingService.showToast("No existe una APP compatible con este tipo de archivo, abriendo con el navegador","bottom",true,2000); setTimeout(()=>{ if(this.dataFile.file.url!=null) this.iab.create (this.dataFile.file.url, '_system', 'location = yes, hardwareback = yes'); },2000); });

Logs taken while reproducing problem

@vahid18u
Copy link

vahid18u commented Mar 12, 2020

I have a similar problem. when I use showOpenWithDialog method, it works in android and let user select what app to open with, but in iOS 12.4.5 nothing happens and surprisingly it does not call error function! it calls success but nothing happens. this is my code:

FileOpener.showOpenWithDialog( myPath, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", { error: function(e) { console.log(e); }, success: function() { console.log("success"); } } );

I need to mention that it works on iOS 13.3 perfectly fine

@pwlin pwlin added the ios label May 13, 2020
@whodeee
Copy link

whodeee commented Aug 14, 2020

Having the same issue iOS 13.3.1 does not open the correct app, it just opens the preview (Quicklook) instead when calling the open() method

@Umesh079
Copy link

Umesh079 commented Sep 9, 2020

is there any update @whodeee , did you found any solution for it?

@whodeee
Copy link

whodeee commented Sep 9, 2020

@Umesh079 I have not found a solution to this unfortunately. I am currently resorting to using the Dialog option and don't really like that. I am hoping a fix comes for this.

@vvarda
Copy link

vvarda commented Mar 23, 2021

Guys, that issue is actual - it doesn't work on IOS.

@FireLizard
Copy link

Same here and I have no clue how to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants