j3k0 / cordova-plugin-openwith

Get your Cordova App in the O.S. "Share" menu on iOS and Android
MIT License
138 stars 114 forks source link

Plugin will not open shares csv files, only images #18

Open patrickschmelter opened 6 years ago

patrickschmelter commented 6 years ago

Hey,

I got everything up and running so far with images. If I want to share an image, my app pops up in the open with dialog. The problem is that I need to open csv files with my app, not images, so I changed the file types accordingly to the following:

        "ANDROID_MIME_TYPE": "text/csv"
        "IOS_UNIFORM_TYPE_IDENTIFIER": "public.comma-separated-values-text"

But on both, ios and android, the app will not be displayed in the dialog when I try to open a csv file. However it still remains visible in the open image dialog. I tried removing the plugin and adding it again, removing the plugin and the platforms, readding both but nothing seems to be working. Has anyone accomplished to open a file other than an image?

maektwain commented 6 years ago

application/ld+json

Did you try the above ?

patrickschmelter commented 6 years ago

Where should I put this? Is this the android mime type? I cant find a matching iOS UTI equivalent

maektwain commented 6 years ago

Yeah the above is the Android mime type...I am little bit confused what do you mean when you are saying app is not displayed ?

Share some screen shots maybe I can help?

patrickschmelter commented 6 years ago

I mean that my App is not listed in the „Open with“-dialog when I want to open a csv file, instead it is still listed when I try to open an image file, even tough the csv mime type and UTI is applied. Im currently not in my office, but I can make screenshots tomorrow to clarify things

maektwain commented 6 years ago

Few things you need to check

It should be in the list of targets like "ShareExt" Configuration with matching target version of iOS , I think it does not work properly with 11

compelling commented 6 years ago

I have the same problem, my app shows up fine when sharing an image from Photos in the simulator, but when sharing a webpage from Safari, the my app is not listed as a sharing app even though --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.url was set. Seems the plugin has been forked in https://github.com/missive/cordova-plugin-openwith who fixed this, but then removed Android support which I need. Hmmm.