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

Vision Camera V2 - Fabric support #1684

Closed
wants to merge 18 commits into from

Conversation

DominikHinc
Copy link

What

Since it'll be a while till v3 comes out we at Flip decided to contribute to the fabric support of vision camera v2. The library compiles on both platforms (1 small issue on IOS, which I will describe later) with Fabric enabled. Taking photo, recording, returning available camera devices etc. works correctly. The only thing which has not been implemented are the frame processors, which even on Paper we are not currently using (due to compatibility with reanimated 3). If someone needs a working camera on Fabric without any fancy processing, this is the code for you.

This implementation still needs more polishing, but due to end of resources on our side I hope somebody can take it from here, majority of migration has already been done.

Known compilation issue:
On IOS, while compiling the library, it will throw such error:

image

I have tried to fix it in various ways, but nothing seems to work. A workaround I used to compile it for development purposes was to just create the mentioned header file directly in the pod directory

image

Creating such file in the source code doesn't work.
If someone know how to fix it, I would appreciate such information.

I hope my code can help in the official migration of version 3 to Fabric. Any further contributions are encouraged.

Changes

  • Add support for IOS Fabric
  • Add support for Android Fabric
  • Enable Fabric as default architecture in the example app
  • Comment out or remove code related to frame processors

Tested on

Few IOS and Android devices, more testing should be done.

Related issues

‼️‼️‼️‼️ ✨ VisionCamera V3 ‼️‼️‼️‼️‼️

@vercel
Copy link

vercel bot commented Aug 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ❌ Failed (Inspect) Oct 23, 2023 11:48am

@keremkurtulus
Copy link

Waiting for updates on this branch!! Thanks for your contributions!

@marcin-piela-800
Copy link

Known compilation issue:
On IOS, while compiling the library, it will throw such error:

You have to update VisionCamera.podpsec file:

   # All source files that should be publicly visible
   # Note how this does not include headers, since those can nameclash.
   s.source_files = [
+    "VisionCamera.h",
     "ios/**/*.{m,mm,swift}",
     "ios/CameraBridge.h",

Thanks @DominikHinc it works like a charm on iOS (we don't support android yet so haven't tested it)

@mrousavy
Copy link
Owner

mrousavy commented Mar 4, 2024

Heyo - looks like I never replied to this PR (sorry for that!), but this is actually quite helpful. I can't merge it because Frame Processors are required, but I think this might be of help for the V3 Fabric upgrade: #2614

@mrousavy
Copy link
Owner

mrousavy commented May 8, 2024

Hey - thanks for the PR again, but I'm gonna close this now in favor of the new architeecture migration for VC V4

@mrousavy mrousavy closed this May 8, 2024
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.

4 participants