Share images from Dropbox/Google Photos into Expo app?


I may have reached the point where I have to detach my Expo project. I need to add my app to the drawer of “sharing options” when choosing to share an asset type from inside a third party library.

From inside the camera roll app, for example, I could click an image, then click share, and get something like:

This would launch the Expo app and run some handler function.

I found this issue on GitHub and commented:

One of the maintainers has stated: “There is no native share extension API”, so I assume this is pretty much a case-closed issue.

I am wondering two things:

1. Has anyone run into this before, and found a way around it without detaching?
2. How do you do this in vanilla RN, anyways (not the best question for this forum)?



I’m assuming you’ve seen the docs on adding this feature: in which Apple walks you through how to get a UTI (:joy:)

If you wanna play with my thoughts, here they are:

I’ll only cover iOS as I’ve only ever done this on native iOS.

You mostly need access to the info.plist - supported
Then add support for your favorite file types!

        <string>Molecules Structure File</string>
        <string>Molecules Structure File</string>

Which maybe translates to this:


  "ios": {
    "infoPlist": {
      "CFBundleDocumentTypes": [
           "CFBundleTypeIconFiles": [
          "CFBundleTypeName": "Molecules Structure File",
          "CFBundleTypeRole": "Viewer",
          "LSHandlerRank": "Owner",
          "LSItemContentTypes": [
      "UTExportedTypeDeclarations": [
          "UTTypeConformsTo": [
          "UTTypeDescription": "Molecules Structure File",
          "UTTypeIdentifier": "com.sunsetlakesoftware.molecules.pdb",
          "UTTypeTagSpecification": {
            "public.filename-extension": "pbd",
            "public.mime-type": "chemical/x-pdb"

LSItemContentTypes: is a pain so maybe experiment with this in a native project.
CFBundleTypeIconFiles: I have no clue how we’d do this one but maybe a script or something can compile a local image asset.

Finally when the user opens your app, you need to get the file - not sure about this one.
This is done through an AppDelegate method called application:openURL:sourceApplication:annotation
It looks like we do something with this but I’m not sure where you access that. (I didn’t really look :upside_down_face:)

If also looks like depending on the state of the app, the file might be open and passed to application:didFinishLaunchingWithOptions instead!

This is also made confusing by the addition of the files app in ios - I’m not sure how it plays into this exact feature but let’s say it did :sweat_smile:you would add this key to your app.json ios.infoPlist.UIFileSharingEnabled: true

Anyways, this is a tricky topic that is very platform specific so Expo probably won’t support soon… probs detach.

Looking for help in (Deep Linking) Open Email attachment to my app. For example => import csv data to the app or any alternative solution Please!
closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.