Harish Mahajan
Harish Mahajan

Reputation: 3294

How to show my cordova app in IOS share menu?

We have an existing Cordova iOS App for which we need an iOS share extension which will allow Users to to share files from other apps (like Photos, Pages, Numbers, Keynote, etc) with our App (i.e. Export file from Pages to our App).

We need the following delivered:

Upvotes: 5

Views: 5101

Answers (4)

K.S
K.S

Reputation: 401

There are few links which could be helpful even if you do not want to use open with plugin

https://irace.me/tumblr-ios-extension

http://engineering.curalate.com/2017/03/09/ios-share-ext-with-ionic.html

In android editing, the manifest worked fine for me. I had to add one more java file added in some already added plugin like below in plugin.xml. Which in turn added in the manifest.

            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
                <data android:mimeType="application/pdf"/>
                <data android:mimeType="application/msword"/>
                <data android:mimeType="application/mspowerpoint"/>
                <data android:mimeType="application/powerpoint"/>
                <data android:mimeType="application/vnd.ms-powerpoint"/>
                <data android:mimeType="application/x-mspowerpoint"/>
                <data android:mimeType="application/excel"/>
                <data android:mimeType="application/vnd.ms-excel"/>
                <data android:mimeType="application/x-excel"/>
                <data android:mimeType="application/x-msexcel"/>
                <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
                <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
                <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
            </intent-filter>
        </activity>

Upvotes: 0

EternalLight
EternalLight

Reputation: 1328

That's a good and still relevant question.

I tried to make use of the awesome cordova-plugin-openwith by Jean-Christophe Hoelt but faced several issues. The plugin is meant to receive share items of one type (say, URL, text or image), which is configured during installation. Also, with its current implementation, writing a note to share and selecting a receiver in a Cordova app are two different steps in different (native and Cordova) context, so it didn't look as a good user experience to me.

I made these and other corrections to this plugin and published it as a separate plugin: https://github.com/EternallLight/cordova-plugin-openwith-ios

Note that it works only for iOS, not for Android.

Upvotes: 1

jeko
jeko

Reputation: 307

There is a cross-platform cordova plugin (iOS and Android) that achieves that: https://github.com/j3k0/cordova-plugin-openwith

Upvotes: 3

dloeda
dloeda

Reputation: 1548

I think you could find a solution here. It is not clear, but it seems to work.

Upvotes: 1

Related Questions