Skip to content

Commit

Permalink
[Update] Change clipboard dependency to @react-native-clipboard/clipb…
Browse files Browse the repository at this point in the history
…oard and fix related issues.
  • Loading branch information
supervons committed Mar 8, 2024
1 parent 761d57a commit cc1d74c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
- 修改 node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm 文件, 927 行 `id<RCTBridgeModule>` 替换成 `Class`

```shell
npm install
yarn install
# 如果是 iOS 则需要执行以下操作,确保网络畅通
cd ios && pod install
```
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
- Change node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm, line 927 `id<RCTBridgeModule>` to `Class`

```sh
npm install
yarn install
# If it is iOS, you need to perform the following operations to ensure that the network is unblocked
cd ios && pod install
```
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ PODS:
- React-perflogger (= 0.73.4)
- RNCAsyncStorage (1.12.1):
- React-Core
- RNCClipboard (1.13.2):
- React-Core
- RNCMaskedView (0.1.11):
- React
- RNDeviceInfo (10.12.0):
Expand Down Expand Up @@ -1243,6 +1245,7 @@ DEPENDENCIES:
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
Expand Down Expand Up @@ -1380,6 +1383,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-clipboard/clipboard"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNDeviceInfo:
Expand Down Expand Up @@ -1466,6 +1471,7 @@ SPEC CHECKSUMS:
React-utils: 6e5ad394416482ae21831050928ae27348f83487
ReactCommon: 840a955d37b7f3358554d819446bffcf624b2522
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNDeviceInfo: db5c64a060e66e5db3102d041ebe3ef307a85120
RNGestureHandler: deda62b8339496ba721a45e0f3e2d7a319932cee
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@ant-design/react-native": "5.0.1",
"@react-native-clipboard/clipboard": "^1.13.2",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/viewpager": "^5.0.11",
Expand Down
4 changes: 2 additions & 2 deletions src/screens/home/morandi/MorandiPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
TouchableOpacity,
} from "react-native";
import Toast from "../../../components/toast";
// import Clipboard from "@react-native-community/clipboard";
import Clipboard from "@react-native-clipboard/clipboard";
const { height, width } = Dimensions.get("window");
/**
* Morandica color scale
Expand All @@ -18,7 +18,7 @@ const { height, width } = Dimensions.get("window");
export default function MorandiPage() {
function selectColor(res) {
Toast.showToast(`copied successfully, please paste to use! ${res}`);
// Clipboard.setString(res);
Clipboard.setString(res);
}
return (
<ScrollView style={{ flex: 1 }}>
Expand Down
4 changes: 2 additions & 2 deletions src/screens/my/settings/version/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from "react";
import { View } from "react-native";
import { ListItem } from "react-native-elements";
import DeviceInfo from "react-native-device-info";
// import Clipboard from "@react-native-community/clipboard";
import Clipboard from "@react-native-clipboard/clipboard";
import Theme from "../../../../styles/theme";
import I18n from "../../../../common/languages";
import Toast from "../../../../components/toast";
Expand All @@ -33,7 +33,7 @@ const list = [
rightTitle: "[email protected]",
onPress: text => {
Toast.showToast(I18n.t("SystemInfo.copySuc"));
// Clipboard.setString(text);
Clipboard.setString(text);
},
},
];
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,11 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@react-native-clipboard/clipboard@^1.13.2":
version "1.13.2"
resolved "https://registry.npmmirror.com/@react-native-clipboard/clipboard/-/clipboard-1.13.2.tgz#28adcfc43ed2addddf79a59198ec1b25087c115e"
integrity sha512-uVM55oEGc6a6ZmSATDeTcMm55A/C1km5X47g0xaoF0Zagv7N/8RGvLceA5L/izPwflIy78t7XQeJUcnGSib0nA==

"@react-native-community/async-storage@^1.12.1":
version "1.12.1"
resolved "https://registry.npmmirror.com/@react-native-community/async-storage/-/async-storage-1.12.1.tgz#25f821b4f6b13abe005ad67e47c6f1cee9f27b24"
Expand Down

0 comments on commit cc1d74c

Please sign in to comment.