iOS Share Extension, get title of shared Item

747 views Asked by At

Does anyone know if it is possible to access the title of a shared item in a share extension. I know that it is possible to get title and some other attributes by JavaScript. The problem is I want to get the title of items shared from the YouTube App for example. In the Image below it would be the string "Welcome G2.."

Thanks for your help.

enter image description here

1

There are 1 answers

2
Witek Bobrowski On BEST ANSWER

I believe it is only possible by supplying URL as shared item to the UIActivityViewController. The header will configure itself with appropriate icon, title and domain. It looks like the example you have provided, YouTube app, uses exactly that.

UPDATE: to retrive title you can use URLSession, try this approach.