React Native and iOS share button

dylan picture dylan · Nov 18, 2016 · Viewed 8.9k times · Source

I am trying to access iOS' share button where you can share content to all services, including messages etc... Any idea how I could do this? Thanks

Answer

MoOx picture MoOx · Nov 9, 2017

You now have a simple Share API in react-native.

import { Share } from "react-native"

Share.share(
      {
        title: "a title",
        message: "some message",
        // or
        url: imageReference
      },
      (options)
    );

See http://facebook.github.io/react-native/docs/share.html