alinz / react-native-share-extension

react-native as an engine to drive share extension
MIT License
763 stars 398 forks source link

Fix react-native-share-extension for iOS 11 #50

Closed bluey31 closed 6 years ago

bluey31 commented 7 years ago

This patch resolves the issue that react-native-share-extension does not currently work within the iOS 11 screenshot editor. Apps using react-native-share-extension that process images will not work within the screenshot editor on iOS 11's release unless this patch is merged.

The patch slightly modifies how react-native-share-extension handles images. Instead of assuming the image exists in persistent storage, it stores it within a temporary directory (which can be accessed through the iOS FileManager) and shares the URL pointing to the image in the temporary directory instead. Loading the image within React Native remains unchanged.

I have also altered the README explaining how to harvest the image using FileManager if it is so needed, along with a few grammatical changes and ordering changes, if they are welcome.

alinz commented 6 years ago

This is awesome, Thank you guys