问题
I am developing one app in that user can upload video to our server. Now I want to add my app in UIActivityViewController
so from gallery user can select video and open my app so it will directly upload to my server from gallery itself.
How can I add my app to UIActivityViewController
? Like Facebook, Vimeo and YouTube in this screenshot:
I have write below code in info.plist file but it’s not showing in the app!
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.video</string>
</array>
</dict>
</array>
and I have seen this post but I do not understand how to do that.
回答1:
Try using public.movie
instead of public.video
and also add a CFBundleTypeRole
key.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.movie</string>
</array>
</dict>
</array>
来源:https://stackoverflow.com/questions/36396152/how-to-add-app-in-uiactivityviewcontroller