Reputation: 46
I have a cordova IOS application. In which user can share text data from other apps. I used cordova-plugin-openwith-ios plugin to get the app in share option. App is displaying in share option and app is opening but it is not showing the shared data. Its not calling the myHandler function. App is working on emulator but not in real device. Tested on Iphone SE and Iphone 6 (iOS 11 updated).
What I have tried:
I have tried below plugins but it worked for only images not for text.
https://github.com/j3k0/cordova-plugin-openwith
So is any other way to do it, or am i missing something?
Upvotes: 0
Views: 729
Reputation: 7521
For IOS it is required to set this variable
--variable IOS_UNIFORM_TYPE_IDENTIFIER=public.image
possible values are indicated at https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1
Upvotes: 0
Reputation: 401
When you install you have to run the following command to get the MIME type support for images/text/pdf this is the one.
cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="text/* , application/pdf, image/*"
Upvotes: 0