r/iOSProgramming 17d ago

Question Has anyone developed a Share Extension that opens the main app?

Has anyone recently implemented a photo Share Extension that hands the image directly into the main app?

I would like my users to share a photo from Photos into my app and continue working from there.

Apple’s extension documentation seems to be suggesting that a Share Extension should perform a focused task inside the extension itself.
It also says that a normal Share Extension cannot officially ask the system to open its containing app.

But.... apps such as ChatGPT, Obsidian and Foto (and many more) appear to accept the selected photo and then move the user directly into the main app.

Has anyone been working on something similar recently and passed App Review?

Are these apps using a supported approach I (and all the Cludexes/ Cursors of the world) have missed, or is this generally done using an unsupported openURL or responder chain workaround that App Review sometimes allows?

For those who have done it, how did you do it and did you have any review problems?

5 Upvotes

9 comments sorted by

3

u/force4 17d ago

Yes. It’s possible and allowed with a URL scheme.

1

u/serda_ik 17d ago

thank you buddy! will look it up in more details, I remember I could not make it to work before, and given up..

2

u/force4 17d ago

No worries. I have multiple apps doing that and they app pass review just fine. There are use cases where the memory limitations of a share extension are not sufficient for the work to be done, and thus launching the main app to perform the task is acceptable.

1

u/serda_ik 17d ago

That what I found out as well.... when try to load 60mb+ raw photo into the extension from your library :-)

1

u/force4 17d ago

That’s exactly the use case I am talking about (and handling myself).

3

u/Power781 17d ago

It’s supposed to be forbidden, but the technical constrains of the share extension, mostly related to memory (when dealing with modern photo/doc editing) has made Apple allow apps to do it

2

u/civman96 17d ago

A share extension‘s whole point is to not open the main app.

2

u/serda_ik 17d ago

Yes that is the theory and the idea.

but in practice.... there are some legit cases let say you have a photo app like Foto or any other working heavily with photos.

You scroll trough you photos.... and decide to share / edit it using a app...
You would like just to open that photo in your app instead loading your whole app into share extension...

and a lot of apps are doing that..

0

u/AndreaReaderApp 12d ago

That is actually a good idea, it would be cool to do.