alinz / react-native-share-extension

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

Video File Issue? #198

Open 1appstudio opened 4 years ago

1appstudio commented 4 years ago

I have successfully implemented react-native-share-extension into my IOS project. I got image path and its extension while sharing the image from photos app but I cant get the path if I share the video file from Photos app?

const {type, value} = await ShareExtension.data();

ShareExtension.m FIle:

if([videoProvider hasItemConformingToTypeIdentifier:VIDEO_IDENTIFIER]) { videoProvider = provider; //index += 1; [videoProvider loadItemForTypeIdentifier:VIDEO_IDENTIFIER options:nil completionHandler:^(id item, NSError error) { NSURL url = (NSURL *)item; index += 1; [itemArray addObject: @{ @"type": @"movie/mp4", @"value": [url absoluteString] }]; if (callback && (index == [attachments count])) { callback(itemArray, nil); } }]; }

Bu the above statement does not return the path for video File?

Please, can you share the working code for video file

ajith-ab commented 4 years ago

i ve used this package with all new features with react native greater than 0.60 support react-native-receive-sharing-intent