I would like to add my app to the UIActivityViewController in other apps. How can I add/register my app to allow other apps to send content to my app? How should I receive this content?
Asked
Active
Viewed 4,982 times
11
Dávid Pásztor
- 45,571
- 9
- 73
- 100
Alberto Segura
- 367
- 3
- 8
-
1Add a share extension to your project and your project will appear in other apps UserActivityViewController – Sandeep Bhandari Dec 22 '17 at 12:01
-
https://stackoverflow.com/questions/35931946/basic-example-for-sharing-text-or-image-with-uiactivityviewcontroller-in-swift – Wasim Malek Dec 22 '17 at 12:17
2 Answers
9
Thank you very much to all of you that answered to my question.
With your answers I realized I have to use a Shared Extension. I have found a really nice video that explains how I have to handle the received information: https://www.youtube.com/watch?v=TBC2m8BbcCE. Maybe it could be useful for somewhere in the future.
Alberto Segura
- 367
- 3
- 8
5
In your Xcode project, go to file > new > target and select "Share Extension".
Your Share Extension is the extension that will provide an option in the share sheet inside other apps.
To learn more about share extensions, check out Apple's guide.
Guilherme Rambo
- 1,823
- 16
- 19