javascript - React Native - Share local image with showShareActionSheetWithOptions -
i have question sharing local image showshareactionsheetwithoptions
.
here code:
actionsheetios.showshareactionsheetwithoptions({ title: "react native", message: "hola mundo", url: '@theme/img/share/share.png', subject: "share link" // email });
from documentation: "if url points local file, or base64-encoded uri, file points loaded , shared directly".
but doesn't work. not sure how access or how path image. in app root folder (where index.io.js located) have "src/theme/img"-folder images are.
in example react-native have image .js file is, doesn't work either.
in current react native version (0.49), valid urls can be:
- chosen
imagepicker
of expo api - screenshot taken via
reactnative.takesnapshot('window')
the path looks like:
/private/var/mobile/containers/data/application/7a8ea990-d8c0-43b9-a527-365111fcbba0/tmp/reactabi21_0_0native/9bd50e06-3d6f-4e44-9465-a17d6be399d4.png
or
file:///var/mobile/containers/data/application/7a8ea990-d8c0-43b9-a527-365111fcbba0/library/caches/exponentexperiencedata/%2540anonymous%252ftestapp2-d4b9a2f3-ffbf-4cba-8b8d-cd555cd62ca8/imagepicker/2d289b12-4090-4f66-ae2b-bcddb1c3086c.jpg
however, local image urls ./theme/img/share/share.png
not supported. way, asset-library://
urls not supported either.
Comments
Post a Comment