Skip to content

fix(template): Add missing configutation for nitro-modules #862

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 3 commits into from
Jun 21, 2025

Conversation

serjooo
Copy link
Contributor

@serjooo serjooo commented Jun 16, 2025

Summary

While creating a nitro-module using npx create-react-native-library@latest and debugging issues I ran to, I noticed there are missing configurations in the podspec.

Mainly the following was missing when building a nitro-module:

  s.source_files = [
    # Implementation (Swift)
    "ios/**/*.{swift}",
    # Autolinking/Registration (Objective-C++)
    "ios/**/*.{m,mm}",
    # Implementation (C++ objects)
    "cpp/**/*.{hpp,cpp}",
  ]

  s.pod_target_xcconfig = {
    # C++ compiler flags, mainly for folly.
    "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
  }

  s.dependency 'React-jsi'
  s.dependency 'React-callinvoker'

This fixes the compilation errors around not finding Folly, or the module not compiling.

Test plan

I tested this locally by running the tool and having the correct generated file.

@serjooo serjooo changed the title Add missing configutation for nitro-modules fix(template): Add missing configutation for nitro-modules Jun 17, 2025
Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR

@satya164 satya164 enabled auto-merge June 21, 2025 19:44
@satya164 satya164 added this pull request to the merge queue Jun 21, 2025
Merged via the queue into callstack:main with commit fe58737 Jun 21, 2025
7 of 9 checks passed
@mrousavy
Copy link
Contributor

👏

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.

3 participants