MaxAst / expo-share-extension

Expo config plugin for creating iOS share extensions with a custom view.
MIT License
230 stars 8 forks source link

Share extension no longer an option after share sheet closed #39

Closed nhuesmann closed 2 months ago

nhuesmann commented 4 months ago

Hi Max,

First of all, thank you so much for this incredible plugin! I can't believe Expo still hasn't directly supported this functionality yet.

I've got an issue as well as a question.

Issue

issue

Steps to reproduce

I'm using Expo SDK 50.

Additional Question

Sorry, wasn't sure the best place to put this so I figured I'd ask here. I noticed in a separate open issue you mentioned being able to view the current memory usage of the share extension - could you point me to any documentation or details on how to do that? I'm running into memory issues when I run the share extension on my native device (What I showed in the demo is a stripped down version for demo purposes).

Thank you!

nhuesmann commented 4 months ago

Regarding my additional question, I figured out how to debug the share extension to see memory usage. I stripped the extension down to just rendering a single view and text and it was still using 70mb. I also tried running everything in release mode with --no-dev --minify and the result was the same. I cant imagine that a view and some text should be using up almost all the allotted memory. Any tips on how to work around this?

MaxAst commented 3 months ago

Hi @nhuesmann, if the share extension no longer appears it is indeed most likely a memory issue. React native uses 60-70mb by default in dev mode, so this is expected. In release mode, it's about 30-40mb. However, since the limit is 120mb for share extensions, this shouldn't be an issue. Are you using the basic example in your demo video, or are you doing anything else that might be consuming memory?

MaxAst commented 3 months ago

and does this only happen in debug mode or also in release mode?

nhuesmann commented 3 months ago

Hey @MaxAst, thanks for the reply - sorry for my late response, I got covid and was down for the count 💀

In the video, I was using a pretty basic example. A few providers, but the whole share extension was just a simple view with some text. And this was release mode.

Have you been able to achieve more complex UI/UX given the limits of the share extension and how much RN uses? If my UI/UX needs just wont make it possible, could I in theory just write a completely separate share extension in Swift and ship it with my app to avoid the RN overhead? I've never had to ship a share extension so this is uncharted territory for me. Thanks in advance!

nhuesmann commented 2 months ago

Not encountering this issue anymore, closing for now