cordova-plugin-openwith
cordova-plugin-openwith copied to clipboard
public.movie and public.url dont work
I initially was not able to able to get the app showing when sharing a link in safari or a video file. That was when I realized that the ShareExtension/ShareExtension.plist
wasn't set up for it:
<dict>
<key>NSExtensionActivationDictionaryVersion</key>
<integer>2</integer>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
<key>NSExtensionActivationUsesStrictMatching</key>
<integer>1</integer>
</dict>
After that, the app began appearing when sharing videos/webpages from Safari, but, after selecting the video/website to share, I notice that none of them work. I've tried UTI's of public.movie
, public.item
, and nothing works. The only thing that works is images, if the UTI is set to public.image
or public.item
. Otherwise, the data is alway empty:
Attempting to share a movie, in OpenWithPlugin.m
's checkForFileToShare
method:
{
backURL = "photos-redirect://";
data = <>;
name = "";
text = "Movie\n";
uti = "public.mpeg-4";
utis = (
"public.mpeg-4"
);
}
Attempting to share a website, in OpenWithPlugin.m
's checkForFileToShare
method:
{
backURL = "";
data = <>;
name = "";
text = "f - Google Search";
uti = "public.url";
utis = (
"public.url"
);
}
It seem's as if ShareViewController.m
didSelectPost
method isnt grabbing the data correctly. public.image
works great without issues. Are other UTI's supported in this plugin besides images?