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

Why can't i share a file with other applications on iPhone?

$
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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>