alinz / react-native-share-extension

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

Remove stopping provider finder if find one #62

Open seclace opened 7 years ago

seclace commented 7 years ago

Hi! This package is very useful and thanks for your work! I've tried it with sharing from app apple.news and was confused when began sharing. Apple.news app shares two providers - string title and url url, but in extension takes only first matching - if string encounters first then the data prop will be the string, if it image so the data will be the image and so on. I'm very foolish in objective-c and don't know, how it could be reached to take the all providers from the app sharing you from and pass them to the javascript side. Because of it I remove stopping the attachments iterator when provider found. It will be better if someone who knows objective-c could update this code to reach the goal. How do you think, @alinz ?

exentrich commented 6 years ago

Agree! Without this fix many apps share incorrect data.

arribbar commented 6 years ago

You could just put IMAGE_IDENTIFIER check in the first if