As part of ENG-614, I ran npx @rnx-kit/dep-check --set-version 0.69.6 on the advice of React Native Upgrade Helper. That script directed me to update react-native-clipboard.
Details
- I ran the app on my iOS Simulator and made sure ImageModal's copy function still worked
- This was the only use case I could find of the patch-package'd methods
- I made sure Clipboard.setString still worked
- The other use cases were for this method from the original library
- I tested one of the use cases (copy message text) to make sure the method still worked
- I ran through the release notes
- Didn't see anything of note
Note that in-app paste wasn't working in the iOS Simulator, but that's not handled by this library. I think that is actually an Apple issue.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
After upgrading Expo, we might consider migrating to expo-clipboard, which has full support for images and formatted text. We would no longer need the patch.
Note that in-app paste wasn't working in the iOS Simulator, but that's not handled by this library. I think that is actually an Apple issue.
This issue is known for a long time, I encountered it when I was revamping expo-clipboard and they still haven't fixed it.
After upgrading Expo, we might consider migrating to expo-clipboard, which has full support for images and formatted text. We would no longer need the patch.
Generally open to that, but important to note that our current implementation has two advantages:
- Allows copy of image without needing any traffic across the React Native bridge (uses URL as identifier)
- Pulls image from the same cache that react-native-fast-image uses to render the image (SDWebImage)
However, worth noting that it only works on iOS today.