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

[Draft] feat: add macOS support #2836

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

Saadnajmi
Copy link
Contributor

@Saadnajmi Saadnajmi commented Dec 26, 2024

Note

This PR is a working branch of all changes needed to get a PoC of macOS working. It will be split off into multiple smaller PRs like #2835 before I mark it as ready for review

Summary

Add macOS support for React Native Skia. Some notes along the way

  • react-native-test-app has an expo config plugin to add reanimated support. This doesn't work with reanimated 3.4.0+. Luckily, after 3.4.0, we don't need a plugin at all (@tido64 fyi) (related [3.4] Fails to build in expo eas software-mansion/react-native-reanimated#4831)
  • react-native-screens doesn't have macOS support (yet), so I couldn't use the larger test app with multiple examples. To work around this, I registered the examples with RNTA directly in the app.json/Appregistry. I think I'd rather undo this and just have one example to check this in, while I go add support for react-native-screens.
  • I was having trouble with the Turbomodule registry not finding WebGPUModule (even though it listed it as registered). So I commented out any tests involving webgpu in this draft PR.
  • I had to comment this bit of code out of rn-gesture-handler to stop it from throwing an error. It still works 🤷
  // if (__DEV__ && !rootViewContext && !isJestEnv() && Platform.OS !== 'web') {
  //   throw new Error(
  //     'GestureDetector must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'
  //   );
  // }

Test Plan

Same as the "Fabric" example app, I have the breathing animation example page working.

Screen.Recording.2024-12-25.at.7.22.59.PM.mov

@wcandillon
Copy link
Contributor

this is very exciting :)

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.

2 participants