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

Feature Request: New Architecture Support #537

Open
perqa opened this issue Apr 14, 2023 · 12 comments
Open

Feature Request: New Architecture Support #537

perqa opened this issue Apr 14, 2023 · 12 comments

Comments

@perqa
Copy link

perqa commented Apr 14, 2023

Feature Request: New Architecture Support

Hello,
I'm wondering if someone is looking into migrating React Native Camera Kit to use Fabric (i.e. the React Native New Architecture).
I'm opening this issue to understand what's the current status of this.
I saw that someone opened a ticket on a specific module here , but I'm after a more general reply.

Why it is needed
Originally requested here

Code sample
Not a real code sample, but contains a sample of a library that is backward compatible with both the old and the new arch of React Native.

@scarlac
Copy link
Collaborator

scarlac commented Jun 29, 2023

No immediate plans to support the new Architecture. We welcome any PRs that might add support for it though.

@parz1
Copy link

parz1 commented Oct 9, 2023

maybe you can adapt this module through this @perqa
reactwg/react-native-new-architecture#135

@deepesh-bex
Copy link

@parz1 I tried doing that but the screen just becomes black. No crash but no success either.

module.exports = {
  dependencies: {
    ...
  },
  project: {
    ios: {
      sourceDir: "./ios",
      unstable_reactLegacyComponentNames: ["CKCamera"],
    },
    android: {
      unstable_reactLegacyComponentNames: ["CKCameraManager"],
    },
  },
  assets: ["./assets/fonts/"],
};

Maybe I'm doing something wrong in here?

@scarlac
Copy link
Collaborator

scarlac commented Oct 16, 2023

Make sure you prompt for permissions. Otherwise screen shows as black.
We recommend react-native-permissions. It's a good library that stays up to date with permissions on both platforms (permissions change frequently on both platforms)

@deepesh-bex
Copy link

deepesh-bex commented Oct 25, 2023

I implemented the library, but still got a black screen. What other reasons can be there for a black screen?

This black screen issue is particularly in iOS (android works fine with new arch)

@scarlac
Copy link
Collaborator

scarlac commented Oct 25, 2023

Check the native logs to see what the issue is. With Xcode compilation you can see it in the console. There should be some sort of log statement.

@deepesh-bex
Copy link

deepesh-bex commented Oct 26, 2023

If I do
bundle exec RCT_NEW_ARCH_ENABLED=1 && pod install
It works but if I do

bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
It doesn't

The Xcode logs have {fabric: true} flag when running the second one.
Should I make changes to the

unstable_reactLegacyComponentNames: ["CKCamera"],

and include more components which we have in iOS?

@ThienMD
Copy link

ThienMD commented Dec 5, 2023

The same issue for me when I tried: unstable_reactLegacyComponentNames: ["CKCamera"],

@VitorHRD
Copy link

VitorHRD commented Feb 1, 2024

The same issue for me:

module.exports = {
  project: {
    ios: {},
    android: {
      unstable_reactLegacyComponentNames: ['CKCameraManager' ,'CKCamera'],
    },
  },
  assets: ['./src/assets/fonts/'],
};

For me the bug doesn't happen on iOS, but on Android it shows that the component is not supported in fabric mode, my app has all the libraries configured for fabric mode, going back is impossible for me

@WoLewicki
Copy link

Hey, we at Software Mansion have been working on improving support for the new architecture for quite a while and we would like to help with migrating this library. Are you open to PRs?

@scarlac
Copy link
Collaborator

scarlac commented Aug 2, 2024

Hey, we at Software Mansion have been working on improving support for the new architecture for quite a while and we would like to help with migrating this library. Are you open to PRs?

Yes

@WoLewicki
Copy link

Hey! I submitted the PR with New Architecture here: #672 🎉

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

No branches or pull requests

7 participants