O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sharing content with ShareSheetIOS

The share sheet, on the other hand, is a different type of interaction. As I mentioned earlier, the Share sheet lets our app share content with it. To open it, we call showShareActionSheetWithOptions. It accepts three arguments: an options object, a failureCallback function, and a successCallback function.

The Share sheet's options object is different from the one that the action sheet accepted. It can contain the following properties:

  • url: This is a stringified URL to share. The url property is required if the message property is not available. The url can point to a local file or base-64 encoded url; it can share images, videos, PDFs, and other types of files this way.
  • message: This is a string that contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required