SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

feat(ios): ability to link local spm packages (#54405)

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

While working on local project in monorepo, I found that `spm_dependency` utility available in CocoaPods does not support local SPM packages, assuming they always come from remote.

This change extends it so that `url` can also be a local path:

```ruby
  spm_dependency(s,
    url: File.join(__dir__, 'shared'),
    requirement: {},
    products: ['FooModule']
  )
```

In the above example, `shared` folder contains a SPM project.

I don't have opinions on the API design here, I am also happy to create `spm_local_dependency` utility in order to clean up the API design.

bypass-github-export-checks

## Changelog:

[iOS] - Allow linking local SPM packages in CocoaPods

Reviewed By: cipolleschi

Differential Revision: D86208056

fbshipit-source-id: 3c8a02f696ebd285f54c6fce4baa344db56ba7d9
D
Devan Buggay committed
d31fc328826a584a2351acf831ee987846ca7e21
Parent: f45518f
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 11/11/2025, 4:50:03 PM