react-native-share
Advanced tools
Comparing version 11.1.0 to 12.0.0
{ | ||
"name": "react-native-share", | ||
"description": "Social share, sending simple data to other apps.", | ||
"version": "11.1.0", | ||
"version": "12.0.0", | ||
"repository": { | ||
@@ -33,2 +33,3 @@ "type": "git", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@expo/config-plugins": "^9.0.10", | ||
"@react-native/eslint-config": "^0.74.0", | ||
@@ -41,2 +42,3 @@ "@react-native/metro-config": "^0.73.2", | ||
"@semantic-release/release-notes-generator": "^12.1.0", | ||
"@tsconfig/node-lts": "^22.0.0", | ||
"@tsconfig/react-native": "^3.0.2", | ||
@@ -65,3 +67,5 @@ "@types/react": "^18.2.37", | ||
"resolutions": { | ||
"eslint-plugin-prettier": "5.0.1" | ||
"eslint-plugin-prettier": "5.0.1", | ||
"wrap-ansi": "7.0.0", | ||
"string-width": "4.1.0" | ||
}, | ||
@@ -96,5 +100,6 @@ "keywords": [ | ||
"typescript": "tsc --noEmit", | ||
"build:expo-plugin": "tsc --project ./plugin/tsconfig.json", | ||
"validate": "yarn lint && yarn typescript", | ||
"ci:publish": "npx semantic-release", | ||
"prepare": "bob build", | ||
"prepare": "bob build && yarn build:expo-plugin", | ||
"windows": "react-native run-windows" | ||
@@ -101,0 +106,0 @@ }, |
@@ -9,2 +9,63 @@ # react-native-share [![react-native-share](https://circleci.com/gh/react-native-share/react-native-share.svg?style=svg)](https://app.circleci.com/pipelines/github/react-native-share/react-native-share) [![npm version](https://badge.fury.io/js/react-native-share.svg)](http://badge.fury.io/js/react-native-share) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
## Expo Managed Workflow | ||
For Expo projects, you will need to be on a managed workflow and use the following command: | ||
```shell | ||
npx expo install react-native-share | ||
``` | ||
Configure you `app.config.ts` or `app.json` to use the permissions needed by the library: | ||
```json | ||
{ | ||
"plugins": [ | ||
[ | ||
"react-native-share", | ||
{ | ||
"ios": [ | ||
"fb", | ||
"instagram", | ||
"twitter", | ||
"tiktoksharesdk", | ||
], | ||
"android": [ | ||
"com.facebook.katana", | ||
"com.instagram.android", | ||
"com.twitter.android", | ||
"com.zhiliaoapp.musically", | ||
] | ||
} | ||
] | ||
] | ||
} | ||
``` | ||
`ios` parameter will take care of adding queries (LSApplicationQueriesSchemes) to the Info.plist. | ||
```xml | ||
<key>LSApplicationQueriesSchemes</key> | ||
<array> | ||
<string>fb</string> | ||
<string>instagram</string> | ||
<string>twitter</string> | ||
<string>tiktoksharesdk</string> | ||
</array> | ||
``` | ||
`android` parameter will take care of adding queries to the AndroidManifest.xml. | ||
```xml | ||
<queries> | ||
<package android:name="com.facebook.katana" /> | ||
<package android:name="com.instagram.android" /> | ||
<package android:name="com.twitter.android" /> | ||
<package android:name="com.zhiliaoapp.musically" /> | ||
</queries> | ||
``` | ||
And prebuild the project with `expo prebuild`. | ||
## Bare React Native | ||
If you are using `react-native >= 0.7X` and/or the new arch you just need to do a simple: | ||
@@ -26,2 +87,4 @@ | ||
# Usage | ||
Then simply import: | ||
@@ -28,0 +91,0 @@ |
326212
109
35