Skip to content

Enable Defines Module option for RCTImage pod#51974

Closed
kkafar wants to merge 1 commit into
facebook:mainfrom
kkafar:@kkafar/define-modules-for-rct-image
Closed

Enable Defines Module option for RCTImage pod#51974
kkafar wants to merge 1 commit into
facebook:mainfrom
kkafar:@kkafar/define-modules-for-rct-image

Conversation

@kkafar
Copy link
Copy Markdown
Contributor

@kkafar kkafar commented Jun 12, 2025

Summary:

This is to enable consuming RCTImage pod in mixed ObjC/Swift codebase. W/o this option set I get following error when building the library:

Installing RNScreens 4.11.1
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `RNScreens` depends upon `React-RCTImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

I've noticed that there is also a precedent in the form of c8fcac2, which handled very simlar case but for React-jsc pod.

Changelog:

[IOS] [FIXED] - Allow for consuming RCTImage in Swift codebase by enabling "Defines Module" option

Test Plan:

RNTester should build & run correctly

This is to enable consuming this pod in mixed ObjC/Swift codebase.
W/o this option set I get following error when building the library:

```
Installing RNScreens 4.11.1
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `RNScreens` depends upon `React-RCTImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```

I've noticed that there is also a precedent in the form of
facebook@c8fcac2,
which handled very simlar case but for `React-jsc` pod.
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Software Mansion Partner: Software Mansion Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jun 12, 2025
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi 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 fixing this

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 12, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in 1d80586.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @kkafar in 1d80586

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Software Mansion Partner: Software Mansion Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants