[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[ ] I am making a fix / change for the macOS implementation of react-native
[x] I am making a change required for Microsoft usage of react-native
Summary:
This is the last PR (for now) in a series of PRs to add visionOS support to React Native macOS
Add the actual native support for visionOS. This is done mostly with nicely placed ifdefs. Some notes:
Amusingly, many places where we added macOS ifdefs are also places we need vision ifdefs :D
In places where we started having nested ifdefs (#if !TARGET_OS_OSX && !TARGET_OS_VISION), the code inside is usually an iOS only API, and therefore the most correct ifdef to use is #if TARGET_OS_IOS. As such, there are a couple of places where I updated the usage.
We can't test the RNTester-visionOS in CI yet (sadly), as we need an Arm64 image of macOS with the visionOS SDK to build visionOS, and Azure Pipelines doesn't seem to have that currently. Instead, let's locally verify that the scheme builds and runs. I took this screenshot with #2056 also cherry-picked because as of the time of writing, that PR hasn't landed yet.
Please select one of the following
Summary:
This is the last PR (for now) in a series of PRs to add visionOS support to React Native macOS
Add the actual native support for visionOS. This is done mostly with nicely placed ifdefs. Some notes:
#if !TARGET_OS_OSX && !TARGET_OS_VISION
), the code inside is usually an iOS only API, and therefore the most correct ifdef to use is#if TARGET_OS_IOS
. As such, there are a couple of places where I updated the usage.Changelog:
[INTERNAL] [ADDED] - Add visionOS support
Test Plan:
We can't test the RNTester-visionOS in CI yet (sadly), as we need an Arm64 image of macOS with the visionOS SDK to build visionOS, and Azure Pipelines doesn't seem to have that currently. Instead, let's locally verify that the scheme builds and runs. I took this screenshot with #2056 also cherry-picked because as of the time of writing, that PR hasn't landed yet.