Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add visionos support #5627

Merged
merged 7 commits into from
Feb 8, 2024

Conversation

okwasniewski
Copy link
Contributor

@okwasniewski okwasniewski commented Feb 1, 2024

Summary

This PR adds visionos support. I've refactored call sites to UIApplication.sharedApplication.keyWindow (it's unavailable on visionOS) for RCTKeyWindow() its a React Native core utility for retrieving key window. (In one of my recent PRs it got support for multi-window scenarios: facebook/react-native#42036)

CleanShot.2024-02-01.at.17.06.55.mp4

Test plan

  1. Init new visionOS app npx @callstack/react-native-visionos@latest init MyApp
  2. Install Reanimated from GitHub commit or link it locally:

"react-native-reanimated": "git@github.com:okwasniewski/react-native-reanimated.git#feat/visionos",

@okwasniewski
Copy link
Contributor Author

okwasniewski commented Feb 1, 2024

I don't get what's wrong with this import 🤔 Validate iOS CI is showing this:

CleanShot 2024-02-01 at 17 23 54@2x

@piaskowyk
Copy link
Member

Thank for the PR! 😍 and don't worry about CI, I'll check it 🫡

@tomekzaw
Copy link
Member

tomekzaw commented Feb 4, 2024

I don't get what's wrong with this import 🤔 Validate iOS CI is showing this:

Looks like it was related to the order of imports, moving #import <React/RCTView.h> directly below #import <React/RCTUtils.h> resolved the error 😅

j-piasecki pushed a commit to software-mansion/react-native-gesture-handler that referenced this pull request Feb 5, 2024
## Description

This PR adds support for visionOS platform. Based on
software-mansion/react-native-reanimated#5627.

## Test plan

```
npx @callstack/react-native-visionos@latest init VisionApp
yarn add software-mansion-labs/react-native-gesture-handler#@tomekzaw/visionos
cd visionos
pod install
```
@tomekzaw tomekzaw self-requested a review February 7, 2024 20:50
@piaskowyk piaskowyk added this pull request to the merge queue Feb 8, 2024
Merged via the queue into software-mansion:main with commit bf822bd Feb 8, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants