Skip to content

fix: ios example duplicated symbols due to codegen #757

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

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

atlj
Copy link
Collaborator

@atlj atlj commented Jan 27, 2025

Summary

Fixed #755

There is an effort towards shipping React Native in a prebuilt format on iOS. As a result, some of the codegen-related custom code have to be generated at the build time. However, these changes also affected the codegen generated native code for libraries. This PR patches that behavior on bob level.

Related PRs:

Test plan

This adds 3 unit test cases to make sure we're able to parse the codegen paths and delete the necessary files.

To test it locally:

  1. Build bob
  2. Create a new library using npx create-react-native-library, and pick turbo modules
  3. Link the local bob by calling yarn link path/to/bob --all in the new library
  4. Call yarn bob build --target codegen
  5. Make sure there is no .podspec file or mm files in android/generated
  6. Make sure there is no .podspec file or any of the following files in ios/generated:
  'RCTAppDependencyProvider.h',
  'RCTAppDependencyProvider.mm',
  'RCTModulesConformingToProtocolsProvider.h',
  'RCTModulesConformingToProtocolsProvider.mm',
  'RCTThirdPartyComponentsProvider.h',
  'RCTThirdPartyComponentsProvider.mm',
  'ReactAppDependencyProvider.podspec',

@atlj atlj changed the title fix ios example duplicated symbols due to codegen fix: ios example duplicated symbols due to codegen Jan 27, 2025
@atlj atlj merged commit c1b508a into main Jan 28, 2025
19 of 20 checks passed
@atlj atlj deleted the @atlj/fix-codegen-duplicated-symbols branch January 28, 2025 08:08
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.

[iOS] Library project generated for Turbo Module fails to build with React Native 0.77.0
1 participant