achorein / expo-share-intent-demo

React Native Expo Share Intent Demonstration
90 stars 9 forks source link

Supporting images, videos and files #4

Closed kayode0x closed 1 year ago

kayode0x commented 1 year ago

Hey, great work on this. I was wondering if it's ready to accepted files. I see the helper functions are implemented. Also tried to work on this locally by adding

+                    NSExtensionActivationSupportsFileWithMaxCount: 1,
+                    NSExtensionActivationSupportsImageWithMaxCount: 1,
+                    NSExtensionActivationSupportsMovieWithMaxCount: 1,

to /patches/expo-config-plugin-ios-share-extension+0.0.4.patch, but it fails to patch the package. I need to edit this from the package in node_modules, but in there it's clean. Any help? thanks.

achorein commented 1 year ago

Thanks,

Yeah, that was the goal of this PR on expo-config-plugin-ios-share-extension.

I think I can update my current patch to enable those plugin parameters

  "plugins": [
     [
       "expo-config-plugin-ios-share-extension", 
       {
          "activationRules": {
               "NSExtensionActivationSupportsFileWithMaxCount": 1,
               "NSExtensionActivationSupportsImageWithMaxCount": 1,
               "NSExtensionActivationSupportsMovieWithMaxCount": 1,
          }
       }
     ]
  ],
kayode0x commented 1 year ago

Okay, I'll wait on the update. Or let me know if you need a hand, thanks.

achorein commented 1 year ago

Here the updated patch : expo-config-plugin-ios-share-extension+0.0.4.patch

Just have to add plugins parameters mention above. I need to do more tests, i got some issues to open app after using the share menu in the "Photos" simulator.

kayode0x commented 1 year ago

Sweet, thank you!

achorein commented 1 year ago

@kayode0x just added the code on the main branch, I had to modify the patch again. everything works fine, I updated the README. enjoy!