react-native-clipboard / clipboard

React Native Clipboard API for both iOS and Android.
MIT License
690 stars 142 forks source link

feat: Add visionOS support #227

Closed Saadnajmi closed 6 months ago

Saadnajmi commented 6 months ago

Overview

Add visionOS support to @react-native-clipboard/clipboard. To do so I needed to first:

  1. Use @rnx-kit/align-deps to update the package to React Native 0.73 (minimum required for visionOS support)
  2. Move the test app to react-native-test-app, so that we don't need to add a bunch of boiler plate for a new visionOS app.
  3. Move over the old test app's App.tsx to the new test app

Test Plan

visionOS test app runs. iOS test app runs. macOS test app boots, but seems to error before rendering anything (not sure why). Screenshot 2024-04-03 at 1 47 55 PM

short-dsb commented 5 months ago

This PR bumps the required React Native version to v0.73. Will this library no longer support v0.72 and earlier going forward?

Saadnajmi commented 5 months ago

This PR bumps the required React Native version to v0.73. Will this library no longer support v0.72 and earlier going forward?

Ah, meant to only bump the test app version. No source code changes so it should work with older versions

Saadnajmi commented 5 months ago

This PR bumps the required React Native version to v0.73. Will this library no longer support v0.72 and earlier going forward?

Ah, meant to only bump the test app version. No source code changes so it should work with older versions

@Naturalclar i can revert the rn minimum version bump?

short-dsb commented 5 months ago

@Saadnajmi NP! Thanks for your work on this. 🙂

Naturalclar commented 5 months ago

@Saadnajmi

@Naturalclar i can revert the rn minimum version bump?

sure :+1: sorry for not checking throughly :pray:

Saadnajmi commented 5 months ago

@Saadnajmi

@Naturalclar i can revert the rn minimum version bump?

sure 👍 sorry for not checking throughly 🙏

https://github.com/react-native-clipboard/clipboard/pull/235

I also fixed an issue with adding Yarn 4 that I noticed in the same PR

ezescigo commented 4 months ago

Hi, Is this fixed? I am getting this when installing 1.14.1 (RN 0.71.14) npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: react-native@0.71.14 npm ERR! node_modules/react-native npm ERR! react-native@"0.71.14" from the root project npm ERR! peer react-native@"^0.61.5 || ^0.62.3 || ^0.63.2 || ^0.64.2 || ^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.69.0 || ^0.70.0 || ^0.71.0 || ^0.72.0 || ^0.73.0" from @react-native-clipboard/clipboard@1.14.1 npm ERR! node_modules/@react-native-clipboard/clipboard npm ERR! @react-native-clipboard/clipboard@"^1.14.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react-native@"^0.73.0" from react-native-windows@0.73.15

Thank you