Alberto Segura
Alberto Segura

Reputation: 445

How to receive sharing content in my app?

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?

enter image description here

Upvotes: 16

Views: 7851

Answers (2)

Alberto Segura
Alberto Segura

Reputation: 445

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.

Upvotes: 11

Guilherme Rambo
Guilherme Rambo

Reputation: 2046

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.

Upvotes: 6

Related Questions