Skip to content

fix: codegen config#4616

Merged
KrzysztofMoch merged 2 commits intov7from
fix-v7/codegen
Jul 21, 2025
Merged

fix: codegen config#4616
KrzysztofMoch merged 2 commits intov7from
fix-v7/codegen

Conversation

@KrzysztofMoch
Copy link
Copy Markdown
Contributor

Summary

Fixes codgen config

Before VideoView was not registered in RCTThirdPartyComponentsProvider.thirdPartyComponents, and on New Architecture was treated as “Paper View” (View from Old Architecture) - So it was running using Interop Layer 🥲

This should also fixes crashes on React Native 0.80+

Fixes #4600

Test plan

  1. Create new blank app with React Native 0.80
  2. Add VideoView to App
  3. Run app on iOS
  4. There should be no crash

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the codegen configuration for the React Native Video component to properly support the New Architecture by renaming the component from VideoView to RNCVideoView and updating related configuration. This ensures the component is properly registered in the third-party components provider instead of falling back to the Interop Layer.

Key changes include:

  • Renaming the native component from VideoView to RNCVideoView across all platforms
  • Updating codegen configuration to include proper component provider mapping for iOS
  • Adding component descriptors for Android New Architecture support

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
VideoViewNativeComponent.ts Updates the codegenNativeComponent call to use 'RNCVideoView' name
react-native.config.js Adds componentDescriptors configuration for Android
package.json Updates codegenConfig with new component name and iOS component provider mapping
iOS files Renames classes and interfaces from VideoView to RCTVideoViewComponentView
Android files Updates class names and constants to use RNCVideoView prefix
android/build.gradle Updates libraryName in React configuration
Comments suppressed due to low confidence (1)

packages/react-native-video/ios/view/fabric/RCTVideoViewComponentView.mm:84

  • The function name VideoViewCls should be updated to reflect the new component name, such as RNCVideoViewCls, to maintain consistency with the renamed component.
Class<RCTComponentViewProtocol> VideoViewCls(void)

@KrzysztofMoch KrzysztofMoch moved this from To Triage to In Review in React Native Video - Public Roadmap Jul 17, 2025
@8699921209
Copy link
Copy Markdown

Hi @KrzysztofMoch 👋
Thank you for this PR — it looks like a really helpful fix!

I tried applying these changes in my own setup (React Native 0.80 with New Architecture enabled), but I couldn't get it to work properly — the app still crashes when trying to render the

Could you please guide me step-by-step on how to properly test this fix in a fresh or existing app?
I'm not sure if I'm missing some configuration related to codegen or third-party component registration.

Thanks in advance for your help! 🙏

@KrzysztofMoch
Copy link
Copy Markdown
Contributor Author

I will merge this and make release, so you should be able to just bump version and test it

@KrzysztofMoch KrzysztofMoch merged commit 7b8d0b8 into v7 Jul 21, 2025
@KrzysztofMoch KrzysztofMoch deleted the fix-v7/codegen branch July 21, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[BUG]: Thread 1: "-[RCTView setNitroId:]: unrecognized selector sent to instance 0x30c9705e0"

3 participants