Files
react-native/scripts/releases
Riccardo Cipolleschi 3f41fe2948 Make fmt and SocketRocket compatible with Swift (#50874)
Summary:
`SocketRocket` and `fmt` are part of React Native dependencies.
If a library is written in swift and depends on them, it will fail to install the pods because these pods are not compatible with Swift.

This change makes sure that the pods are installed in a way that is swift compatible.

## Changelog:
[iOS][Fixed] - Make fmt and SocketRocket Swift friendly

Pull Request resolved: https://github.com/facebook/react-native/pull/50874

Test Plan:
Tested locally in a nightly app.

### Before the change:

```
yarn add react-native-video
cd ios
bundle exec pod install
```

This script resulted in this error:

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

The Swift pod `react-native-video` depends upon `fmt` and `SocketRocket`, which do 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.
```

### After the change

```
yarn add react-native-video
cd ios
bundle exec pod install
```

This script installed pods successfully.

Reviewed By: cortinico

Differential Revision: D73512109

Pulled By: cipolleschi

fbshipit-source-id: 222d85dba1cbdf4044e3c8459008a4083a720016
2025-04-23 12:07:20 -07:00
..

scripts/releases

Scripts related to creating a React Native release. These are the lower level entry points used by scripts/releases-ci.

Commands

For information on command arguments, run node <command> --help.

create-release-commit

Creates a release commit to trigger a new release.

set-version

Bump the version of all packages.

  • Updates package.json metadata for all workspaces and the project root.
  • Updates relevant native files in the react-native package.

If --skipReactNativeVersion is passed, the react-native package version will be left unmodified as "1000.0.0" (special static version on main), and native files will not be touched.

set-rn-artifacts-version

Note

Deprecated: Prefer set-version. This entry point is a subset of set-version, and is used only by test workflows. We will replace these call sites in future.

Updates relevant native files in the react-native package to materialize the given release version. This is run by set-version unless --skipReactNativeVersion is passed.