Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make an app appear in share panel to accept selected text from other apps

I'm writing an app in iOS which handles text. Normally users can enter in their own text via a text area but I would also users like to be able to highlight text in other apps (e.g. mail, websites etc.) and allow users to send text via selection and the share panel where my app would then appear? Can I do this in iOS and if so how? Is this like the reverse of UIActivityViewController?

An example from my phone. I'm on a website, see phrase which is interesting, I select it, and then send it to Notes from the text highlighting share option. Notes is an Apple app but I could also send it to other third party apps such as Twitter or WhatsApp. I would like my app to also appear on this shared list and be able to receive and process the text.

like image 441
drw Avatar asked Jan 22 '26 19:01

drw


1 Answers

What you need is to add an app extension with a Share extension type to your app. You can read more on app extensions here to get started.

https://developer.apple.com/library/mac/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1

like image 185
Ahmed Onawale Avatar answered Jan 24 '26 10:01

Ahmed Onawale