{"id":15595575,"url":"https://github.com/cdimascio/react-native-share-sheet","last_synced_at":"2025-04-28T11:15:43.757Z","repository":{"id":57158391,"uuid":"50048129","full_name":"cdimascio/react-native-share-sheet","owner":"cdimascio","description":"iOS share sheet for React Native","archived":false,"fork":false,"pushed_at":"2018-01-20T21:15:22.000Z","size":128,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T11:15:37.644Z","etag":null,"topics":["ios","react-native","share","share-sheet"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdimascio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-20T17:44:13.000Z","updated_at":"2022-01-31T13:52:51.000Z","dependencies_parsed_at":"2022-09-02T15:51:06.051Z","dependency_job_id":null,"html_url":"https://github.com/cdimascio/react-native-share-sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdimascio%2Freact-native-share-sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdimascio%2Freact-native-share-sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdimascio%2Freact-native-share-sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdimascio%2Freact-native-share-sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdimascio","download_url":"https://codeload.github.com/cdimascio/react-native-share-sheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251302782,"owners_count":21567601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","react-native","share","share-sheet"],"created_at":"2024-10-03T01:00:42.640Z","updated_at":"2025-04-28T11:15:43.735Z","avatar_url":"https://github.com/cdimascio.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-share-sheet\n\nUse the iOS share sheet from React Native\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/cdimascio/react-native-share-sheet/blob/master/assets/share-sheet.jpg?raw=truef\" width=\"350\"/\u003e\n\u003c/p\u003e\n\n## Install\n\n1. `npm install react-native-share-sheet`\n2. In XCode, in the project navigator, right click Libraries -\u003e Add Files to [YourProjectName]\n3. Go to `node_modules/react-native-share-sheet/RNShareSheet` and add `RNShareSheet.m`, `RNShareSheet.swift, RNShareSheet-Bridging-Header.h`\n4. Rename `RNShareSheet-Bridging-Header.h` to `[YourProjectName]-Bridging-Header.h`\n\n## Use\n\n`import { ShareSheet } from 'react-native-share-sheet`\n\n```javascript\nconst share = {\n  imageUrl: 'http://facebook.github.io/react-native/img/opengraph.png',\n  text: 'some super cool text'\n}\nShareSheet.open(share)\n```\n\n## Example\n\n```javascript\nimport React, {\n  AppRegistry,\n  Component,\n  StyleSheet,\n  Text,\n  TouchableOpacity,\n  View\n} from 'react-native';\n\nimport { ShareSheet } from 'NativeModules'\n\nconst share = {\n  url: 'http://facebook.github.io/react-native/',\n  text: 'some super cool text'\n};\nclass ShareSheetDemo extends Component {\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTouchableOpacity onPress={() =\u003e ShareSheet.open(share)}\u003e\n          \u003cText style={styles.text}\u003e\n            Share\n          \u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#F5FCFF',\n  },\n  text: {\n    backgroundColor: 'lightblue',\n    padding: 10,\n    fontSize: 20,\n    textAlign: 'center',\n    margin: 10,\n  },\n});\n\nAppRegistry.registerComponent('ShareSheet', () =\u003e ShareSheetDemo);\n```\n\n## Options\n\n| Property |          |               Value                |\n| -------- | -------- | :--------------------------------: |\n| text     | optional |               string               |\n| imageUrl | optional | url string or asset library string |\n| url      | optional |    url of the web page to share    |\n\n**If both `imageUrl` and `url` specified, `imageUrl` will appear as the share preview**\n\n### Examples \n\n#### `imageUrl`\n\n* Asset Library path \\* `assets-library://asset/asset.JPG?id=FF5F38D6-AACC-1116-3091-AF3499CD923D\u0026ext=JPG`\n* Image Url \\* `http://facebook.github.io/react-native/img/opengraph.png`\n\n#### `text`\n\n* \\#ReactNative is awesome!\n\n#### `url`\n\n* http://facebook.github.io/react-native/\n\n## MISC\n\nWorks great with _react-native-camera_!\n\nSnap a pic with _react-native-camera_ and share it with _react-native-share-sheet_. _react-native-camera_ will return the new photo's asset library path which can be shared using _react-native-share-sheet_\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdimascio%2Freact-native-share-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdimascio%2Freact-native-share-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdimascio%2Freact-native-share-sheet/lists"}