I would like my app to appear in the UIActivityViewController
for text, in other apps. For example, when sharing from the Notes app as shown below.
Adding the following to the Info.plist didn't produce any visible results (in Notes, Evernote and Simplenote):
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>icon-text-57.png</string>
<string>icon-text-72.png</string>
<string>icon-text-114.png</string>
</array>
<key>CFBundleTypeName</key>
<string>Text</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.text</string>
<string>public.plain-text</string>
<string>public.utf8-plain-text</string>
<string>public.utf16-external-plain-text</string>
<string>public.utf16-plain-text</string>
<string>public.rtf</string>
</array>
</dict>
</array>
Is this possible? How?
Short answer: you can't.
Currently, you cannot add your app into other UIActivityViewControllers
, unless you create your own UTI and the app ( Notes, Evernote and Simplenote) add code into their app to show yours.
What you are likely referring to, though, is the UIDocumentInteractionController
, which is different, and there you CAN add your app, and I believe you are doing that correctly.
The things you are trying are all UIActivityViewControllers
so no matter how hard you try, your app will not show up there.
Quick note to add: A good way to distinguish between is UIActivityViewControllers
and a UIDocumentInteractionController
is to see if "Dropbox" comes up in it. From my experience the Dropbox app has a "catch-all" UTI and can take any file so it usually comes up in nearly all UIDocumentInteractionController
's. Of course, you'll need to have the app installed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With