Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Why won't my filepath allow me to share the file to other applications?

$
0
0

I'm trying to open a file to be linked to another app (Instagram) on my iPhone. I edit this video file so i'm not getting it directly from my camera roll, but i have a link to it locally which i've logged on my physical device below:

uri:

"private/var/mobile/Containers/Data/Application/(Long filename).mp4"

What i'm trying to to with this is:

shareToApp = (uri) => {
        amendedURI = 'file://' + uri;       
        let encodedURL = encodeURIComponent(amendedURI);  
        let instagramURL = 'instagram://library?AssetPath=${' + encodedURL + '}';
        return Linking.openURL(instagramURL);
}

but the screen where you share to 'Feed' or 'Stories' doesn't display my video.

Is there something in the uri path which prevents me from achieving this?


Viewing all articles
Browse latest Browse all 16750

Trending Articles